-
Notifications
You must be signed in to change notification settings - Fork 28
Run In Production
| Feature | Added By | Action Required |
|---|---|---|
| Avoid storing credentials in sessions | Vanguard | None |
| Use Digest Authentication | Vanguard | None |
| Deploy Remotely | Vanguard | Yes |
| Avoid storing passwords with sourcecode | Vanguard | Yes |
| Better fault tolerance in front end | Vanguard | None |
| Whitelist endpoints | Vanguard | Yes |
This is accomplished by using Digest authentication and storing the token in a session.
Basic authentication allowed usernames and passwords to be passed from the middle tier to the server in clear-text. Digest authentication allows us to use a token.
To create your production configuration files, use the following command:
# gulp init-prodThen modify deploy/production.properties to contain the connection information required to deploy to the production server.
Credentials in general can be stored in /etc and loaded into environment variables to be used by the middle tier. The following is a list of variables available:
-
APP_NAMEThe name of the application -
APP_PORTThe port used by the middle tier to listen for requests -
ML_HOSTThe hostname or IP address of the MarkLogic Server -
ML_PORTThe port of the MarkLogic App Server hosting the RAPI -
ML_APP_USERThe MarkLogic username for guest access -
ML_APP_PASSThe MarkLogic password for guest access -
ML_GUEST_ACCESSBoolean to allow guest access -
DISALLOW_UPDATESBoolean to prevent updates (POST and PUT) -
APP_USERS_ONLYBoolean requiring users to authenticate
This is implemented by using the ng-idle library to detect connection problems
Running adhoc queries against the RAPI may enable a user to access more information than intended. Creating custom endpoints in the middle tier that allow the query to be scrubbed and validated before being proxied to the RAPI can reduce this threat.
Understanding this library
- Background
- Explaining the stack
- Project folder structure
- Core Tools and Components
- REST extensions
- UI and UX Details
- Possible Issues
Creating your own demo