MIDRC-1285 Validate token audience#110
Conversation
|
The style in this PR agrees with This formatting comment was generated automatically by a script in uc-cdis/wool. |
Coverage Report for CI Build 28875207213Coverage increased (+0.2%) to 60.327%Details
Uncovered ChangesNo uncovered changes found. Coverage Regressions21 previously-covered lines in 2 files lost coverage.
Coverage Stats
💛 - Coveralls |
| scopes, audience and purpose (all optional). | ||
|
|
||
| Args: | ||
| audience (Optional[str|set]) |
Avantol13
left a comment
There was a problem hiding this comment.
remember to add info to "Breaking Changes" in the PR description
| scopes, audience and purpose (all optional). | ||
|
|
||
| Args: | ||
| audience (Optional[str|set]) |
|
|
||
| def set_current_user(**kwargs): | ||
| # If not already passed an aud to expect, default to the generic "gen3" aud | ||
| kwargs.setdefault("jwt_kwargs", {}).setdefault("audience", "gen3") |
There was a problem hiding this comment.
"gen3" is a configuration in Fence, so it should ideally be a configuration or passed in here as an arg. If someone changes it - we need to allow that value here. Alternatively, we could not put it in config in Fence and just hard-code it
There was a problem hiding this comment.
Replaced the configurable DEFAULT_TOKEN_AUDIENCE from fence with a hardcoded "gen3".
There was a problem hiding this comment.
we should not have a arbitrary string here though, we should use a global constant so it's clear this is something that is global and constant and shouldn't be changed.
GEN3_TOKEN_AUDIENCE = "gen3", in this file even.
Link to JIRA ticket if there is one: https://ctds-planx.atlassian.net/browse/MIDRC-1285
Reverts changes from #87, except the default audience is now "gen3"
New Features
Breaking Changes
Bug Fixes
Improvements
Dependency updates
Deployment changes