Is there a reason why i cant bootstrap Providers like i can most other things? #1201
Replies: 1 comment 3 replies
-
|
The only thing you can bootstrap is the default admin user and an API key, but I guess you mean adding things later on with that bootstrapped API key. The reason why you can do almost everything with them, apart from Auth Provider CURD (and some other things), is actually security. Auth provider setup requires you to work on both sides, like create an "App" upstream, generate a secret, and copy it over to Rauthy. So, because it requires manual work (usually), it does not make much sense to do this via API. The other thing is that especially Auth providers are one of the most sensitive things. If an attacker hijacks an API Key or it simply leaks in some CI/CD logs for instance, the upstream provider page could be mocked and then the redirect URI changed on Rauthys side. If done well, even an admin would probably not recognize it right away and it would lead to account takeover of everyone using this provider. The last reason is, that upstream providers are usually one-time setup and are then never touched again. If you really, really need to do it anyway, you could theoretically create a real admin session after bootstrap and provide the session cookie and CSRF token with the request instead of the API key. Most of the integration tests work that way as well. Only a real session can currently modify Auth Providers. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I tried to bootstrap adding github and goodle as 3rd party providers and this wasn't allowed as a Group for the bootstrap API-Key token?
Database migration error: ErrorResponse { timestamp: 1758306733, error: BadRequest, message: "Payload deserialization error: Error("unknown variant
Providers, expected one ofBlacklist,Clients,Events,Generic,Groups,Roles,Secrets,Sessions,Scopes,UserAttributes,Users,Pam", line: 22, column: 26)" }.I know this isn't the biggest thing, but i always prefer to have my application setup laid down programmatically rather than througt interface.
Love Rauthy <3
Beta Was this translation helpful? Give feedback.
All reactions