Introduction
URAC micro-service V3 configuration variables that are needed and can be customized
1. Password generation configuration
You can change the values of the below variables to customize iterations, seeding, and the algorithm used to hash passwords.
Name | Type | Description | Example |
---|---|---|---|
hashIterations | integer | Hashing iteration value used by SOAJS hasher to encrypt/compare passwords | 16 |
seedLength | integer | Seed length value used by SOAJS hasher to encrypt/compare passwords | 32 |
optionalAlgorithm | string | Password Hashing algorithm name | "aes-128-cbc-hmac-sha256" or "des". You can go to List of Crypto Algorithms to find the name of the algorithm that you can use. |
2. 3rd party login configuration
Define application keys for passport integration. Currently supporting Twitter, Facebook, and Google. For more information and an example of the configuration, go to Passport Login.
3. Mail Configuration
- Under common fields in order to be used in other microservices not only in URAC.
- Under URAC configuration in order to customize mail options to handle URAC requirements.
Examples:
"commonFields" : { "mail" : { // to control the smtp configuration } } "urac" : { // this object to control the links in the emails "links": {...} // this object to control the content of the emails "mail": { "join": {... //this is the join email content configuration} "forgotPassword": {... //} } } "mail": { "from": 'me@localhost.com', "transport": { "type": "sendmail", "options": {} } }
"mail": { //urac mail options "join": { "subject": 'Welcome to SOAJS', "path": "./mail/urac/join.tmpl" }, "forgotPassword": { "subject": 'Reset Your Password at SOAJS', "path": "./mail/urac/forgotPassword.tmpl" }, "addUser": { "subject": 'Account Created at SOAJS', "path": "./mail/urac/addUser.tmpl" }, "changeUserStatus": { "subject": "Account Status changed at SOAJS", //use custom HTML "content": "<p>Dear <b>{{ username }}</b>, <br />Your account status has changed to <b>{{ status }}</b> by the administrator on {{ ts|date('F jS, Y') }}.<br /><br /> Regards,<br/> SOAJS Team. </p>" }, "changeEmail": { "subject": "Change Account Email at SOAJS", "path": "./mail/urac/changeEmail.tmpl" } }
Variables used, custom data fields used in "content", more information, and examples of the configuration can be found under Mail Notification Configuration
4. Pin login configuration
Pin configuration is made to add a second layer of authentication to URAC. For full information go to Pin Configuration
5. Data configuration
Resources and database creation steps can be found under Database needed by URAC. More information can be found under the registry configuration layer below.
Configuration priority and the default values
This table illustrates the configuration that can be overridden at a different layer of configuration
Priority
Local → Registry → Tenant
- Local Configuration
- Custom Registry
- Service Configuration (Tenant)
Name | Local Configuration (Default) config.js | Registry Configuration (Per Environment) req.soajs.registry | Tenant Configuration (Per Tenant Per Environment) | |
---|---|---|---|---|
Settings | Custom | |||
pinConfiguration | ✓ | ✓ | ✓ | |
model¹ | "mongo" | ✓ | ||
hashIterations | 24 | ✓ | ||
seedLength | 12 | ✓ |
model¹: We currently only support mongo models.
Add Comment