bug-1685143: Changed Auth0 Audience URL#7202
Conversation
There was a problem hiding this comment.
Some high level feedback:
- Your commit subject isn't following our commit subject conventions per the Socorro docs. Ideally we'd have some kind of automated enforcement of this, but we don't. Can you update it?
- In terms of the substance of the PR title/commit message and PR description, you're not really explaining what the issue was, or what caused it.
- This PR is a resource for the reviewer at the time the patch is written, but also an artifact for future reference and should accurately reflect what the issue was and why the change is needed. Just saying it's a different and correct URL doesn't explain why the previous URL didn't work. I know in this case we don't want to mention the URL values explicitly, but we can still go a bit further in explaining the bug and the fix. If you have questions about the root cause or why this fixes it, please ask!
| OIDC_OP_AUTHORIZATION_ENDPOINT = _config("OIDC_OP_AUTHORIZATION_ENDPOINT", default="") | ||
| OIDC_OP_TOKEN_ENDPOINT = _config("OIDC_OP_TOKEN_ENDPOINT", default="") | ||
| OIDC_OP_USER_ENDPOINT = _config("OIDC_OP_USER_ENDPOINT", default="") | ||
| AUTH0_MANAGEMENT_API_ENDPOINT = _config("AUTH0_MANAGEMENT_API_ENDPOINT", default="") |
There was a problem hiding this comment.
This has an empty string as a default value -- is it set in the environment for local dev? If not, I don't think socorro will start up locally (or at least, we won't be able to run this cron job locally). Can you test this? You'll likely need to add the config to local_dev.env as the other OIDC* config are there as well.
Also, I think this group makes sense to put this new config, but can you put it in alphabetical order?
Also also, I regret including "Auth0" in the variable name. Auth0 is a provider for the OIDC protocol standard. But we may change providers in the future, in which case this variable name won't make sense. I'm not going to make you change it; just something to keep in mind in the future for naming variables. Naming things is hard!
223ab8d to
faa8808
Compare
Because:
auditgroupscronjob is raising a 403 error in the functionget_access_token, meaning the Auth0 API is not able to query the usersaudienceparameter in the request payload points to the external domain behind a Fastly WAF (This ticket shows some context on the domain change in socorro: CRINGE-135)This PR:
AUTH0_MANAGEMENT_API_ENDPOINT.get_access_tokenfunction.