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
Copy file name to clipboardExpand all lines: README.md
+27-13Lines changed: 27 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,8 +3,7 @@
3
3
i.e. How to connect legacy web apps that only support SAML to be backed by Kanidm OIDC. While the configs in this repo can be educational for rolling your own SATOSA setup, an opinionated ENV configurable container image is also provided.
4
4
5
5
> [!CAUTION]
6
-
> This is an early version that only supports a 1:1 proxy config where a single SAML supporting web service auths via a single OIDC endpoint.
7
-
> The intent is to morph into a "v2" that allows a dynamic mapping of multiple systems to multiple OIDC endpoints via a single SAML proxy. The simpler version will be preserved for educational purposes but is intended to become "legacy".
6
+
> This example on purpose only supports a 1:1 proxy config where a single SAML supporting web service auths via a single OIDC endpoint. To limit blast radius, just deploy multiple if you have multiple SAML-only services.
8
7
9
8
## TODO items on the roadmap
10
9
1. Get rid of the idpyoidc git build once there's a release that contains ES256 support.
@@ -15,7 +14,7 @@ i.e. How to connect legacy web apps that only support SAML to be backed by Kanid
15
14
The container built at `ghcr.io/jinnatar/satosa-saml-proxy:latest` is a proof of concept using the SATOSA configs in the repo. The guides below will assume you are using it, but nothing prevents you from using the same configs and ENV config with any other supported SATOSA installation method. I am using the container myself in my environment and have a vested interest in keeping it going and tested.
16
15
17
16
The caveats with the container and/or trying to go without it:
18
-
- While recent releases of SATOSA support PKCE, they depend on the Python library `idpyoidc` for this. Unfortunately it has an issue that prevents using ES256 for signing with released versions. The container thus uses [a branch from git](https://github.com/IdentityPython/idpy-oidc/tree/issuer_metadata) that contains the fix for this. Once a full release is made with said fix that will be used specifically. Once SATOSA requires a high enough release of `idpyoidc` that contains a fix, we can stop with this nonsense altogether.
17
+
- While recent releases of SATOSA support PKCE, they depend on the Python library `idpyoidc` for this. Unfortunately it has an issue that prevents using `ES256` for signing with released versions. The container thus uses [a branch from git](https://github.com/IdentityPython/idpy-oidc/tree/issuer_metadata) that contains the fix for this. Once a full release is made with said fix that will be used specifically. Once SATOSA requires a high enough release of `idpyoidc` that contains a fix, we can stop with this nonsense altogether.
19
18
- The containers are now version tagged as per SATOSA upstream versions. However, due to the above nonsense those tags will be updated later when better build provenance is available.
20
19
21
20
### Container config options
@@ -67,23 +66,35 @@ SAML is a bit *involved* so we need to prep a persistent certificate and provide
67
66
### Practical example: Ceph SSO via Kanidm
68
67
1. Pre-create your users in Ceph to give them the correct authz. In this example we'll use short usernames for simplicity so that needs to match.
69
68
1. Create your Kanidm OIDC configuration the usual way, no need to disable PKCE!
70
-
```
71
-
kanidm system oauth2 create ceph Ceph https://saml.example.com # **Important**, give the proxy URL here.
72
-
kanidm system oauth2 prefer-short-username ceph # Use short usernames for convenience
73
-
kanidm system oauth2 update-scope-map ceph ceph_admins openid profile email # Create the scope map, don't forget to create the group and add your Ceph admins to it.
74
-
kanidm system oauth2 show-basic-secret ceph # Get your client_secret for use later on.
69
+
```shell
70
+
# **Important** give the upstream Ceph landing page URL here:
71
+
kanidm system oauth2 create ceph Ceph https://ceph.example.com
72
+
73
+
# **Important** give the proxy callback URL here. The full value depends on $OIDC_NAME:
74
+
kanidm system oauth2 add-redirect-url ceph https://ceph-saml.example.com/oidc_ceph
75
+
76
+
# Use short usernames for convenience
77
+
kanidm system oauth2 prefer-short-username ceph
78
+
79
+
# Create the scope map, don't forget to create the group and add your Ceph admins to it.
80
+
kanidm system oauth2 update-scope-map ceph ceph_admins openid profile email
81
+
82
+
# Get your client_secret for use later on:
83
+
kanidm system oauth2 show-basic-secret ceph
75
84
```
76
85
1. Create your SAML2 certs and set their permissions as per the generic steps above, nothing special here.
77
86
1. We can't get Ceph to spit out it's metadata XML before the proxy is functioning so we skip ahead.
78
87
1. Config your ENV variables into a new env file, `ceph.env`. If you don't change the ENCRYPTION_KEY value you deserve everything you get as a result.
79
88
```shell
80
-
LOG_LEVEL=debug # Enables debug logging for troubleshooting. Change this to "info" when everything works!
89
+
# Enables debug logging for troubleshooting. Change this to "info" when everything works!
0 commit comments