I want to deploy Rauthy with Alakazam and automatically set up SSO integrations. This PR adds the following to support this:
- Added bootstrapping admin password and API key
- Added abra.sh functions for creating clients, groups and roles with the Rauthy API
- Documentation and example for Nextcloud integration
* [x] I have deployed and tested my changes
* [x] I have [updated relevant versions in `abra.sh`](https://docs.coopcloud.tech/maintainers/upgrade/#updating-versions-in-the-abrash)
* [x] I have made my environment variable changes [backwards compatible](https://docs.coopcloud.tech/maintainers/upgrade/#backwards-compatible-environment-variable-changes)
* [x] I have added a [release note entry](https://docs.coopcloud.tech/maintainers/upgrade/#creating-new-release-notes)
Woah, amazing work @dannygroenewegen 👏 I have some extremely minor comments but otherwise, this is looking pretty great. Do whatever you want with those comments. There are quite some gymnastics to get this up and running but it seems relatively straightforward, all said and done. I won't have time to test this but I think you should become a recipe maintainer just for this new functionality 😛 Let us know when you're happy with it and we can see about merging/releasing. Let's see what @3wordchant thinks of it. Thanks again!
Woah, amazing work @dannygroenewegen 👏 I have some extremely minor comments but otherwise, this is looking pretty great. Do whatever you want with those comments. There are quite some gymnastics to get this up and running but it seems relatively straightforward, all said and done. I won't have time to test this but I think you should become a recipe maintainer just for this new functionality 😛 Let us know when you're happy with it and we can see about merging/releasing. Let's see what @3wordchant thinks of it. Thanks again!
We generally have a convention of X_ENABLED=1/0 to turn stuff on/off. See other recipes for how that is handled. It is a more explicit way of configuring the recipe which I appreciate. Up to you if you want to go that route.
We generally have a convention of `X_ENABLED=1/0` to turn stuff on/off. See other recipes for how that is handled. It is a more explicit way of configuring the recipe which I appreciate. Up to you if you want to go that route.
I've seen that, but it's not applied everywhere. I feel that's a bit redundant with uncommenting compose.x.yml (also because uncommenting .yml and setting X_ENABLED=0 doesn't always fully disable in every implementation), but no strong preference. It makes sense to at least be consistent within a recipe and compose.smtp.yml in this recipe also uses it. So I add an X_ENABLED env for every compose.x.yml, right?
I've seen that, but it's not applied everywhere. I feel that's a bit redundant with uncommenting compose.x.yml (also because uncommenting .yml and setting X_ENABLED=0 doesn't always fully disable in every implementation), but no strong preference. It makes sense to at least be consistent within a recipe and compose.smtp.yml in this recipe also uses it. So I add an X_ENABLED env for every compose.x.yml, right?
I feel that's a bit redundant with uncommenting compose.x.yml (also because uncommenting .yml and setting X_ENABLED=0 doesn't always fully disable in every implementation)
Agreed, fine to drop X_ENABLED in general, certainly fine to not do it with this change.
> I feel that's a bit redundant with uncommenting compose.x.yml (also because uncommenting .yml and setting X_ENABLED=0 doesn't always fully disable in every implementation)
Agreed, fine to drop `X_ENABLED` in general, certainly fine to not do it with this change.
I would do BOOTSTRAP_API_KEY= to drop the example which just needs to be deleted by every operator in the .env who uses it? If you want to include an example of a encoded key, that can be done in the README.md?
I would do `BOOTSTRAP_API_KEY=` to drop the example which just needs to be deleted by every operator in the `.env` who uses it? If you want to include an example of a encoded key, that can be done in the `README.md`?
I used the same naming as Rauthy internally uses and API_KEY is a bit confusing since it's not really a key. From your comment, I'm not sure if you might also be assuming it's a secret, so ignore the following if you got that part: The value in API_KEY is a Base64 encoded JSON with the access rights that should be given to the API key that will be bootstrapped.
The value I put here is Base64 of api.key.example.json, which is read and create rights for clients, groups and roles. Basically, the minimal access rights you need for using the provided abra.sh functions. I feel that's a fair value to put as default? But also happy to put it in the readme if it's confusing to have something here that looks like a secret?
Another option would be to rename this to e.g. API_BASE64_ACCESS_RIGHTS. Maybe that avoids the confusion of thinking it's a default key? Then it's named differently from Rauthy's own naming, but if you get to that layer, you can probably unconfuse yourself with the docs.
I used the same naming as Rauthy internally uses and API_KEY is a bit confusing since it's not really a key. From your comment, I'm not sure if you might also be assuming it's a secret, so ignore the following if you got that part: The value in API_KEY is a Base64 encoded JSON with the access rights that should be given to the API key that will be bootstrapped.
The value I put here is Base64 of api.key.example.json, which is read and create rights for clients, groups and roles. Basically, the minimal access rights you need for using the provided abra.sh functions. I feel that's a fair value to put as default? But also happy to put it in the readme if it's confusing to have something here that looks like a secret?
Another option would be to rename this to e.g. API_BASE64_ACCESS_RIGHTS. Maybe that avoids the confusion of thinking it's a default key? Then it's named differently from Rauthy's own naming, but if you get to that layer, you can probably unconfuse yourself with the docs.
@dannygroenewegen I think moving the explanatory comment one line down could help clarify that ewog...is the "read and create rights…" default.
Another option would be to rename this to e.g. API_BASE64_ACCESS_RIGHTS.
This also seems fine; maybe putting a comment that it's set to BOOTSTRAP_API_KEY could help avoid the naming-change confusion?
Fine with whichever solution though really.
@dannygroenewegen I think moving the explanatory comment one line down could help clarify that `ewog...` _is_ the "read and create rights…" default.
> Another option would be to rename this to e.g. API_BASE64_ACCESS_RIGHTS.
This also seems fine; maybe putting a comment that it's set to `BOOTSTRAP_API_KEY` could help avoid the naming-change confusion?
Fine with whichever solution though really.
Looks wonderful, if it's working for you then I say shipshipship.
Also echoing the invitation to join as a maintainer @dannygroenewegen (especially to help test that this functionality doesn't break with updates).
Looks wonderful, if it's working for you then I say shipshipship.
Also echoing the invitation to join as a maintainer @dannygroenewegen (especially to help test that this functionality doesn't break with updates).
Looks wonderful, if it's working for you then I say shipshipship.
Also echoing the invitation to join as a maintainer @dannygroenewegen (especially to help test that this functionality doesn't break with updates).
I can join as a maintainer!
> Looks wonderful, if it's working for you then I say shipshipship.
>
> Also echoing the invitation to join as a maintainer @dannygroenewegen (especially to help test that this functionality doesn't break with updates).
I can join as a maintainer!
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
I want to deploy Rauthy with Alakazam and automatically set up SSO integrations. This PR adds the following to support this:
abra.shWoah, amazing work @dannygroenewegen 👏 I have some extremely minor comments but otherwise, this is looking pretty great. Do whatever you want with those comments. There are quite some gymnastics to get this up and running but it seems relatively straightforward, all said and done. I won't have time to test this but I think you should become a recipe maintainer just for this new functionality 😛 Let us know when you're happy with it and we can see about merging/releasing. Let's see what @3wordchant thinks of it. Thanks again!
@@ -31,0 +35,4 @@#SECRET_ADMIN_PWHASH_VERSION=v1 # generate=false# API key# When set before first deploy, rauthy will bootstrap an API key with the Base64 encoded JSON access rights.We generally have a convention of
X_ENABLED=1/0to turn stuff on/off. See other recipes for how that is handled. It is a more explicit way of configuring the recipe which I appreciate. Up to you if you want to go that route.I've seen that, but it's not applied everywhere. I feel that's a bit redundant with uncommenting compose.x.yml (also because uncommenting .yml and setting X_ENABLED=0 doesn't always fully disable in every implementation), but no strong preference. It makes sense to at least be consistent within a recipe and compose.smtp.yml in this recipe also uses it. So I add an X_ENABLED env for every compose.x.yml, right?
Ah, in my mind the
X_ENABLEDwas per-feature, not per-compose variant 😖Maybe we can just slowly back away from this and leave it as-is 🙃
Agreed, fine to drop
X_ENABLEDin general, certainly fine to not do it with this change.@@ -31,0 +39,4 @@# Default value is read and create rights on Clients, Roles and Groups. See https://sebadob.github.io/rauthy/config/bootstrap.html#api-key# After first deploy, api_secret is also used be abra.sh functions (create_clients, create_groups)#COMPOSE_FILE="$COMPOSE_FILE:compose.api.yml"#BOOTSTRAP_API_KEY="ewogICJuYW1lIjoiYm9vdHN0cmFwIiwKICAiZXhwIjpudWxsLAogICJhY2Nlc3MiOlt7CiAgICAgICJncm91cCI6IkNsaWVudHMiLAogICAgICAiYWNjZXNzX3JpZ2h0cyI6WyJyZWFkIiwiY3JlYXRlIl0KICAgIH0sewogICAgICAiZ3JvdXAiOiJSb2xlcyIsCiAgICAgICJhY2Nlc3NfcmlnaHRzIjpbInJlYWQiLCJjcmVhdGUiXQogICAgfSx7CiAgICAgICJncm91cCI6ICJHcm91cHMiLAogICAgICAiYWNjZXNzX3JpZ2h0cyI6WyJyZWFkIiwiY3JlYXRlIl0KICAgIH0sewogICAgICAiZ3JvdXAiOiAiU2VjcmV0cyIsCiAgICAgICJhY2Nlc3NfcmlnaHRzIjpbInJlYWQiXQogICAgfQogIF0KfQo="I would do
BOOTSTRAP_API_KEY=to drop the example which just needs to be deleted by every operator in the.envwho uses it? If you want to include an example of a encoded key, that can be done in theREADME.md?I used the same naming as Rauthy internally uses and API_KEY is a bit confusing since it's not really a key. From your comment, I'm not sure if you might also be assuming it's a secret, so ignore the following if you got that part: The value in API_KEY is a Base64 encoded JSON with the access rights that should be given to the API key that will be bootstrapped.
The value I put here is Base64 of api.key.example.json, which is read and create rights for clients, groups and roles. Basically, the minimal access rights you need for using the provided abra.sh functions. I feel that's a fair value to put as default? But also happy to put it in the readme if it's confusing to have something here that looks like a secret?
Another option would be to rename this to e.g. API_BASE64_ACCESS_RIGHTS. Maybe that avoids the confusion of thinking it's a default key? Then it's named differently from Rauthy's own naming, but if you get to that layer, you can probably unconfuse yourself with the docs.
@dannygroenewegen I think moving the explanatory comment one line down could help clarify that
ewog...is the "read and create rights…" default.This also seems fine; maybe putting a comment that it's set to
BOOTSTRAP_API_KEYcould help avoid the naming-change confusion?Fine with whichever solution though really.
Good ideas. I will move the comment and rename the env. And want to test again afterwards, might take one or two weeks because of holidays.
@@ -14,0 +35,4 @@# Reads a Docker Swarm secret value from the running container# Requires jq locally and SSH access to the server.# Usage: get_secret <secret_name>get_secret() {It's crazy how much work we have to do to work around swarm secrets 🤯
(Feel free to resolve this, just a passing reflection 🙃)
Looks wonderful, if it's working for you then I say shipshipship.
Also echoing the invitation to join as a maintainer @dannygroenewegen (especially to help test that this functionality doesn't break with updates).
I can join as a maintainer!
Nice @dannygroenewegen, thanks! I've added you to the team /
README.md.fa830270e5to8f29d3baaf8f29d3baafto38067eafc2