A secret holds what must never be in the code : keys, passwords, connection strings. Every account gets one at creation, the default secret, and can add more. Code reads them with get secret ; instances pick their connection string from them ; conversions and system APIs use their keys.
Page
Security → Secret Management : the secrets of the account, one of them the default.
Shape
A TypeScript file which exports an object. common is read by API Maker ; add your own sections next to it.
Kept
Encrypted on the server of this environment. Never pushed to Git : each environment has its own values.
Another secret
Every request uses the default secret. Your code reads another secret of the account by its name : getSecret(keys, fromSecretName).
import*asTfrom'types';letSecret:T.ISecretType|any={common:<T.ISecretTypeCommon>{hashingAlgorithm:'SHA256',// the hashing conversion and the hash data APInonce:'85491cec-…',// key of the hashes ; without it, secret is usedencryptionAlgorithm:'AES',// the encryption conversion of the schemassecret:'1eaaca38-…',// never change it once data is encrypted with itencryptionAlgorithmFETransfer:'AES',// encrypt and decrypt data system APIssecretFETransfer:'78e493ee-…',// shared with your frontend or mobile appfeTransferDataValidityInSeconds:300,// an encrypted payload older than this is refusedapiUserPasswords:{// API users can read their password from a path of the secretdefault:'12345',},connectionString:{// offered when you add an instancemongodb:'mongodb://your_username:your_password@server_ip:27017/?authSource=admin&replicaSet=rs0&directConnection=true',mysql_8:'mysql://your_username:your_password@server_ip:server_port?multipleStatements=true',mariadb:'mariadb://your_username:your_password@server_ip:server_port?multipleStatements=true',sqlServer:'Server=server_ip;User Id=user_id;Password=your_password;Trusted_Connection=True;TrustServerCertificate=True;',postgresql:'postgresql://your_username:your_password@server_ip:server_port',oracle:'server_ip:server_port/oracle_process_name',oracle_username:'your_username',oracle_password:'your_password',},// authProviders: <string[]>[], // the auth providers every API needs unless its settings say otherwise},};module.exports=Secret;
The hashing conversion of a schema and the hash data API. SHA256 is the algorithm supported. Without nonce, secret is the key.
encryptionAlgorithm, secret
The encryption conversion : AES. RC4 and TRIPLEDES are legacy ciphers, kept to read the data of API Maker 3 : do not choose them for new data. Changing secret means re-encrypting every encrypted value, and re-hashing when there was no nonce.
Passwords an API user reads by path (common.apiUserPasswords.default), so the password is not in Git.
connectionString
The list offered by the instance form. Any key of the secret can hold one ; this section is a convention.
authProviders
The names of the auth providers every API needs by default. Absent : only the API user token. The settings of an API, a table or a database override it.