Skip to content

Conversation

@brianhanifin
Copy link
Contributor

No description provided.

bewest added 5 commits July 20, 2014 14:23
This changes causes the server to crash if the API_SECRET environment
variable has a value whose length is less than MIN_PASSPHRASE_LENGTH
characters.
The default MIN_PASSPHRASE_LENGTH is 12, so if the API_SECRET variable
is set but less than 12 characters long, the server will crash.

security/privacy review needed
==============================
The API_SECRET is used as a pass phrase in order to generate a unique
token.

The api routes always try to mount themselves.  Before mounting
sensitive routes that allow modifying the application, the secret
token is required to validate the request, or denied.

When the secret token is absent, the sensitive routes should return
404, and should not be mounted.

This change attempts to eliminate some dangerous middle ground between
having a secured api, having a weakly secured api, believing a secure
api is mounted and working when none is, and not having a secure api
mounted.

The only choices available should be:

* secure api mounted
* secure api not mounted

This change hopefully constrains the possibilities to those two
options.
Also some minor clean up of log output during tests.
brianhanifin added a commit that referenced this pull request Jul 23, 2014
Merging latest wip/api-modules changes
@brianhanifin brianhanifin merged commit b870117 into feature/settings-ui Jul 23, 2014
@bewest bewest deleted the wip/api-modules branch July 23, 2014 00:35
sulkaharo pushed a commit that referenced this pull request Aug 28, 2019
psonnera pushed a commit to psonnera/cgm-remote-monitor that referenced this pull request Oct 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants