-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
We identify our callers with the `tag` query parameter: /v1/post_events?tag=dinum To allow multiple callers to post to our app without relying on a single secret (the current JWT_SECURITY_SALT), introduce a new JWT_TAGS_AND_SALTS which contains issuer:salt pairs in a comma-separated string. On an incoming request, find the matching issuer and sign against their secret, throwing an error if the issuer isn't found. Note: if the JWT_TAGS_AND_SALTS isn't set, fallback to the previous implementation with the single JWT_SECURITY_SALT secret).
- Loading branch information
Showing
5 changed files
with
144 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
module.exports = { | ||
secret: process.env.JWT_SECURITY_SALT, | ||
tagsAndSalts: process.env.JWT_TAGS_AND_SALTS, | ||
host: process.env.HOSTNAME, | ||
port: process.env.PORT || 8100, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters