You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The implementation is being dogfed with gitlab as the OpenID issuer.
In order to work, the issuer needs to:
- be discoverable (with `GET /.well-known/openid-configuration`)
- have a `userinfo_endpoint` in the openid configuration
Authentication is done through white-listing. If there are no whitelist
fields, then anyone can create an account, therefore can publish and own
crates in the registry.
When ktra is built with openid, all the user management endpoints are
disabled to avoid tampering through unauthenticated `POST` calls.
Also, there is no point storing a password, but as the password
interface is strongly coupled with the DbManager trait, for the time
being a dummy password is inserted for users. This is deemed not
dangerous as no authenticated routes is compiled when the "openid"
feature is present
A `user_by_login` function has been added to the DbManager trait because
the login is now dynamically computed from the OpenId issuer.
A `token_by_login` function has been added to the DbManager trait
to allow users to only query their existing token through openid instead
of always revoking the old ones.
An extra endpoint is added `GET /replace_token` to forcefully rotate the
token and invalidate the previous one
0 commit comments