Skip to content
  • MangoFly

    A self-hosted WireGuard mesh. Devices connect straight to each other; the coordination server is one binary and a SQLite file, and never sees their traffic.

    encrypted WireGuard · peer to peerLaptopbehind home NATServerin a datacentrePhoneon mobile datacoordination serverone binary · one SQLite filecontrol plane only (TLS)keys · tunnel addresses · peer lists · sealed ICE candidatesholds no private keys · carries no traffic · cannot decryptdatacontrol
  • MangoDock

    Docker management with nothing on the hosts. Reaches each daemon over an ordinary SSH session — no agent to install, no port to open.

    The MangoDock dashboard showing three host cards with container state counts, CPU and memory gauges, a usage history and recent events
  • MangoWiFi

    A Wi-Fi 6/7/8 test bench. One binary runs as Console or Agent either side of the access point under test, measuring latency under real load.

    AP under testWi-Fi 6 / 6E / 7Agentstation side · real radioLAN receiveriperf3 -sConsoleUI · orchestrates · probes
  • Blog
  • Nothing phones home

    No telemetry, no analytics, no crash reporter, no account login. Check it with a packet capture on your own network.

    Download MangoSSH
  • Project
  • Download
  • Guides · Access and governance

    Single sign-on (OIDC)

    Connect your vault to your organisation's identity provider so people join by signing in, get the vault role their IdP groups grant, and lose access to targets when you disable them in the IdP. Use it when your team already lives in Entra ID, Okta, Google or Keycloak.

    • Cloud / Self Hosting Vault
    • OIDC, code + PKCE
    • About 30 minutes

    How it works

    MangoSSH signs in to your IdP directly, in the user's own browser, as a public client using the authorization code flow with PKCE. It sends the resulting ID token to your vault server, which checks the signature against the IdP's published keys, the issuer, the client ID, the expiry, and a one-time nonce tied to that device. It then maps the user's groups to a vault role.

    An existing member simply gets an SSO session and their role updated. A new device is different, because vault membership is end-to-end encrypted: only a device that already holds the vault key can let another one in. So the server files an SSO-vouched join request, and an admin's MangoSSH completes it automatically after checking the IdP's token itself.

    A new device signs in at the identity provider, sends the ID token to the vault server, and an admin's MangoSSH re-checks the token with the identity provider before sealing the vault key to the new device. New device Join with SSO Identity provider Entra, Okta, Keycloak… Vault server verifies, maps groups Admin's MangoSSH holds the vault key 1 sign in (PKCE) 2 ID token 3 request, sealed key 4 re-checks the token
    The server can vouch for a device but cannot admit it. Only an admin's app can seal the vault key, and it trusts the IdP it was told to trust, not the server.

    What you need

    • A Cloud Vault or Self Hosting Vault, and a MangoSSH device that is an admin of it.
    • An OIDC identity provider whose discovery document (/.well-known/openid-configuration) your vault server and your users' devices can reach.
    • Rights to register an application at that IdP.

    Step 1 — Register MangoSSH at your IdP

    Whatever the IdP, the application must be:

    • a public client: no client secret. MangoSSH does not send one;
    • allowed to use the authorization code flow with PKCE (S256);
    • registered with exactly this redirect URI: http://localhost:8251/callback;
    • set up to put the user's groups in the ID token, if you want groups to decide roles. MangoSSH asks for the scopes openid email profile and reads groups from the ID token only.

    Note the issuer URL and the client ID. The issuer must be the exact value your IdP's discovery document lists as issuer (a trailing slash does not matter).

    IdPNotes
    Entra IDRegister the app with a Mobile and desktop applications redirect URI. Issuer: https://login.microsoftonline.com/<tenant-id>/v2.0, using your tenant ID, not common. Add a groups claim to the ID token in the app's token configuration. Entra sends group object IDs, so put those IDs in the group mapping rows. Limiting the claim to groups assigned to the app keeps it short for users in many groups.
    OktaCreate an OIDC native app with the authorization code grant, PKCE and no client authentication. Issuer: your Okta org URL, or your authorization server's URL such as https://<org>.okta.com/oauth2/default. Add a groups claim to the ID token, with a filter that includes your MangoSSH groups.
    GoogleIssuer: https://accounts.google.com. Google's ID tokens do not include group membership, so rely on Allowed email domains and a Default role rather than group mappings. Google's desktop client type may expect a client secret at the token exchange, which MangoSSH does not send, so try one sign-in before you roll it out.
    KeycloakCreate a client with client authentication off, the standard flow on, the redirect URI above, and PKCE method S256. Add a Group Membership mapper with claim name groups, added to the ID token, with full group path off. Issuer: https://<host>/realms/<realm>. To use realm roles instead, set Groups claim to realm_access.roles and make sure the roles reach the ID token.

    Menu names at each IdP change over time; the requirements in the list above are what matter.

    Step 2 — Turn on SSO in MangoSSH

    1. On an admin device, open Dashboard → PAM Dashboard, then Single sign-on under Access.

    2. Fill in the settings (table below). Use Add Mapping for each IdP group that should grant a role. The redirect URI to register is shown there too, with a Copy link.

    3. Tick Enable single sign-on. Tick Require it for access to targets only once people can sign in (see “What SSO gates”).

    4. Click Save SSO Settings. The server fetches your IdP's discovery document and keys straight away, so a wrong issuer fails here rather than at everyone's next sign-in.

    SettingWhat to enter
    Issuer URLThe OIDC issuer. It must be https://; plain http:// is accepted only for localhost testing.
    Client IDThe client ID of the app you registered in Step 1.
    Groups claimThe ID token claim that holds groups. Default groups. A dotted path reaches a nested claim, for example realm_access.roles.
    Allowed email domainsComma-separated, for example corp.example. Empty allows any identity from this IdP. When set, the ID token must carry an email in one of these domains, and an email the IdP marks unverified is refused.
    Session length (hours)How long one sign-in lasts, from 1 to 168. Default 12. This is also your offboarding window.
    Default roleNo access, Viewer or Editor, for identities no mapping matches. Admin is never a default.
    IdP group → vault roleOne row per group. A user in several mapped groups gets the highest role (Admin, then Editor, then Viewer).
    Map your admins before members sign in

    Every SSO sign-in sets that member's vault role to what their groups grant. An existing admin whose groups only map to Editor becomes an Editor at their next sign-in. MangoSSH never demotes the vault's last admin this way, but it will demote the others.

    Step 3 — Teammates join with SSO

    1. Send each teammate the Server URL and the Vault ID.

    2. They open Settings → Self Hosting Vault (or Cloud Vault), fill in the join form with an optional device label, and click Join with SSO.

    3. Their browser opens at your IdP. After they sign in, the browser says “Signed in. You can close this window and return to MangoSSH.”, and the app says which role their groups grant.

    4. An eligible admin device (see below) checks for SSO requests about every 30 seconds. Once it admits the request, the new device receives the vault key and starts syncing. Nobody has to click Approve.

    A sign-in that maps to Admin is never admitted automatically. It waits under Pending join requests for an admin to approve it by hand.

    Auto-approval and the pinned trust anchor

    An admin device completes SSO joins only when all of these hold:

    • MangoSSH is running on it and the vault is unlocked;
    • it is an admin of the vault;
    • its admin has clicked Save SSO Settings on that device. Saving pins the issuer and client ID locally, and the Single sign-on panel shows what the device trusts.

    Before sealing the vault key, the admin's app re-checks the ID token itself: the signature against the pinned IdP's keys, the pinned issuer and client ID, a nonce proving the token was issued for exactly that device and its encryption key, and a sign-in no more than 7 days old. It uses its own pinned settings, not the server's copy, so a compromised vault server cannot get a device admitted that your IdP never vouched for.

    If a check fails, the device writes the refusal to its audit log once and leaves the request under Pending join requests. If you change the issuer or client ID, save the settings on each admin device that should auto-approve.

    Signing in as a member

    The Single sign-on panel shows this device's session, for example “signed in as ann@corp.example (editor) · session ends in 9 hours”. To start or renew one, click Sign in with SSO. If your IdP session is still active, the browser step is usually instant.

    What SSO gates

    With Require it for access to targets ticked, the vault server issues these only to a device with a current SSO session:

    Vault sync is deliberately not gated: people keep their shared hosts and can still connect directly to hosts whose credentials they hold. Admins are not exempt from the gate, but they cannot lock themselves out, because changing the SSO settings needs only the admin role. The server refuses saving “required” with no group mapping and no default role, since that would refuse everyone.

    Offboarding

    Disable or remove the user in your IdP. They cannot sign in again, so their SSO session runs out within Session length, and from then on the gated credentials are refused. A user whose groups no longer map to any role, with no default role, is refused at sign-in in the same way.

    SSO ends access to targets, not membership

    The device stays a vault member and keeps syncing. To remove someone completely, also revoke their device in the vault pane and rotate the vault key, as described in Self-hosting the vault server.

    Limits in this version

    • No immediate revocation: access ends when the SSO session expires, not the moment the IdP disables the user.
    • No SCIM provisioning. Members whose groups stop mapping are refused at sign-in but are not removed from the vault.
    • Users who only open browser share links do not sign in with SSO. The gate applies to the device that creates the link.

    Troubleshooting

    SymptomLikely cause
    SSO not enabled“This vault does not have single sign-on enabled.” SSO is off for this vault, or the Vault ID is wrong.
    Save failsThe error names the IdP's discovery document or its issuer. The Issuer URL does not match what the IdP publishes, or the vault server cannot reach it. For Entra, use the tenant ID rather than common.
    Redirect URI error at the IdPRegister http://localhost:8251/callback exactly, as a public client.
    Port 8251 busy“could not listen on 127.0.0.1:8251 …”. Another sign-in is still waiting, or another program uses the port. Finish or close it and try again.
    Groups grant no access“Your identity provider groups do not grant access to this vault.” The ID token has no groups under the configured claim, or none of them is mapped and there is no default role. For Entra, map object IDs, not names.
    Email domain refused“Your identity's email domain is not allowed in this vault.” The email is missing, in another domain, or marked unverified by the IdP.
    Sign-in expired“This sign-in was not started from this device, or it expired or was already used — start again.” The browser step took more than 10 minutes, or the page was reused.
    Joined, never admittedNo admin device is running, unlocked and has saved the SSO settings, or the role is Admin. Check Pending join requests.
    Credential refused“This vault requires signing in with your organisation's identity provider …”. This device's SSO session has ended. Click Sign in with SSO.