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
+36-15
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,10 @@
1
1
# SATOSA based SAML to Kanidm OIDC proxy
2
2
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
+
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.
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
+
> [!NOTE]
7
+
> If you want to just skip to the part where we use this with Kanidm, you could jump straight to the practical example: [Ceph SSO via Kanidm](#practical-example-ceph-sso-via-kanidm)
8
8
9
9
## TODO items on the roadmap
10
10
1. Get rid of the idpyoidc git build once there's a release that contains ES256 support.
@@ -14,8 +14,8 @@ i.e. How to connect legacy web apps that only support SAML to be backed by Kanid
14
14
15
15
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
16
17
-
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
+
### 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.
19
19
- 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
20
21
21
### Container config options
@@ -67,23 +67,41 @@ SAML is a bit *involved* so we need to prep a persistent certificate and provide
67
67
### Practical example: Ceph SSO via Kanidm
68
68
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
69
1. Create your Kanidm OIDC configuration the usual way, no need to disable PKCE!
70
+
```shell
71
+
# **Important** give the upstream Ceph landing page URL here:
72
+
kanidm system oauth2 create ceph Ceph https://ceph.example.com
73
+
74
+
# **Important** give the proxy callback URL here. The full value depends on $OIDC_NAME:
75
+
kanidm system oauth2 add-redirect-url ceph https://ceph-saml.example.com/oidc_ceph
76
+
77
+
# Use short usernames for convenience
78
+
kanidm system oauth2 prefer-short-username ceph
79
+
80
+
# Create the scope map, don't forget to create the group and add your Ceph admins to it.
81
+
kanidm system oauth2 update-scope-map ceph ceph_admins openid profile email
82
+
83
+
# Get your client_secret for use later on:
84
+
kanidm system oauth2 show-basic-secret ceph
70
85
```
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.
86
+
1. Create your SAML2 certs and set their permissions, remember to set the correct `SN`:
0 commit comments