Allow passing opaque credentials for auth plugins in the `/authorize` API
- Dominant language
- Python
- Stars
- 670
- Forks
- 183
- Avg merge
- 15h 13m
- Merged PRs (30d)
- 368
Description
We often need to implement a site-specific authentication hook plugin for the manager which accepts arbitrarily-formatted authentication data from 3rd parties.
Let's:
- [ ] Add an "opaque" mode (e.g., `?mode=opaque`) to the `/authorize` manager API so that it just accepts arbitrary query parameters and body content so that any internally installed auth-hook plugins could apply custom processing of them.
- [ ] Update the client SDK's functional API, `User.authorize()` to support this opaque mode as well.
- [ ] Add support for the opaque mode in the webserver as well using the updated client.
I think it would be good enough to have a branch to apply different trafaret depending on the "mode" query parameter (which fallbacks to the "email", the current impl.).
This is a refactoring of #1478 and lablup/backend.ai-webui#1862.
JIRA Issue: BA-195
Contributor guide
Research direction
Start by reading the current `/authorize` manager API and its existing email-mode validation, then trace how `User.authorize()` and the webserver call it. Done means opaque mode accepts arbitrary query parameters and body content, the client exposes it, and the webserver selects the appropriate validation branch while preserving the current email-mode behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100