Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 4 additions & 26 deletions content/(account)/identity-connections.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,15 @@ An identity connection lets visitors prove who they are with a sign-in system yo

| Type | `type` | Use it when | You provide |
| --- | --- | --- | --- |
| **OpenID Connect** | `oidc` | Your company signs people in through an OIDC provider | Issuer, client ID, and client secret |
| **OpenID Connect** | `oidc` | Your OIDC provider issues OAuth ID-JAG identity assertions for your team | Issuer, client ID, and client secret |
| **White-label signer** | `signer` | You run your own portal and sign each visitor's identity yourself | Issuer, sign-in URL, and Ed25519 public keys |

Owners and admins create, update, and revoke connections. A connection that team members use to sign in to Spacefast can be changed or revoked only by a team owner, in the dashboard. Every team member can list them. An OAuth token needs the `teams:create` scope to change a connection and `teams:read` to list them.

## Register Spacefast with your OIDC provider
## How each connection type is used

To use `oidc`, register Spacefast in your provider first as a web app with a client secret. Use these values:

| Setting | Value |
| --- | --- |
| Redirect URI | `https://api.spacefast.com/identity/callback` |
| Grant type | Authorization code. Spacefast also sends a PKCE `S256` challenge and a nonce |
| Client authentication | HTTP Basic (`client_secret_basic`) |
| Scopes | `openid email profile` |
| ID token algorithms | `RS256`, `PS256`, `ES256`, or `EdDSA` |

Spacefast reads `<issuer>/.well-known/openid-configuration` over HTTPS. The `issuer` value in that document must match the issuer you enter. If your tenant sets `presentation.accessHandoffOrigin`, the redirect URI is `/identity/callback` on that origin instead. See [Partner API configuration](/platforms/partner-api/configuration).
- **`oidc` connections** trust an OIDC issuer for OAuth identity assertion grants (ID-JAG). Spacefast reads `<issuer>/.well-known/openid-configuration` over HTTPS and verifies `RS256`, `PS256`, `ES256`, or `EdDSA` signatures against the issuer's JWKS. Browser visitors sign in to Spaces through Sign in with Spacefast (with team SSO offered there when configured), not through a per-Space OIDC callback.
Comment thread
indent[bot] marked this conversation as resolved.
Resolved
- **`signer` connections** trust Ed25519 proofs signed by your own portal and exchanged through the signer proof-exchange lane.

## Add a connection in the dashboard

Expand Down Expand Up @@ -114,8 +105,6 @@ Over HTTP, call [`createSpaceShareEntry`](/api/reference/spaces/createspaceshare

Roles, paths, and targets work as they do for every other grant. See [Spacefast Share](/share).

A visitor who cannot open a page sees the Space's access page. It shows **Continue with** and the connection name for each connection that an active grant on that Space trusts. A connection with no grant on the Space does not appear there.

## Build a signer

A signer connection lets your portal prove a visitor's identity with an Ed25519 key registered on the connection. The proof's subject must match the subject on a Space grant. A signer proof lives at most 30 minutes, and never longer than the connection's session lifetime.
Expand Down Expand Up @@ -171,14 +160,3 @@ A revoked connection stays in [`listTeamIdentityConnections`](/api/reference/tea
| `forbidden` | 403 | Your role cannot change connections, or a signer proof was rejected |
| `team_owner_required` | 403 | Team members sign in to Spacefast through this connection, so only an owner can change it, in the dashboard |
| `identity_connection_issuer_exists` | 409 | The team already has an active connection for that issuer |

OIDC sign-in failures show to the visitor during the round trip:

| Code | Status | Meaning |
| --- | --- | --- |
| `oidc_discovery_failed` | 503 or 422 | The discovery document did not load, or it is not valid |
| `oidc_discovery_issuer_mismatch` | 422 | The discovery document names a different issuer |
| `oidc_token_exchange_rejected` | 422 | The provider refused the authorization code or the client credentials |
| `oidc_issuer_mismatch` | 422 | The ID token `iss` does not match the connection |
| `oidc_audience_mismatch` | 422 | The ID token `aud` does not include the client ID |
| `oidc_state_expired` | 422 | The sign-in took longer than 10 minutes. Start again |
2 changes: 1 addition & 1 deletion content/(operate)/share.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ Apps are public by default and use PKCE from the browser. Pass `--confidential`

- **On a public Space**: the page loads with no access check.
- **With a share link**: the token is redeemed before the file is read, so the first request returns the document. The response is never stored in any cache and carries `Referrer-Policy: no-referrer` so the secret does not leak on outbound clicks.
- **On a protected Space with no proof**: the request answers **403** with the Space's access page and `Cache-Control: private, no-store`. On a claimed Space, the page offers **Continue with Spacefast** and a request-access form. It adds a password box when the Space has a password, and a **Continue with `<provider>`** button for each [SSO connection](/sso) the Space has a grant for.
- **On a protected Space with no proof**: the request answers **403** with the Space's access page and `Cache-Control: private, no-store`. On a claimed Space, the page offers **Continue with Spacefast** (where team SSO is available when configured) and a request-access form. It adds a password box when the Space has a password.
- **Submitting a password**: the form posts to the same origin and Spacefast verifies it. On success, it sets the visitor's session cookie and redirects with **303** back to the original path. Passwords are capped at 1024 bytes.
- **With `--require-verified-email`**: a link or password adds one step where the visitor enters an email and clicks a confirmation link within 15 minutes. The proof lasts 1 hour on that credential. Public grants and machine credentials cannot require it.

Expand Down
24 changes: 9 additions & 15 deletions content/(operate)/sso.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Two things have to exist for an SSO sign-in to work:
1. An **identity connection** on the team. It names the issuer and holds the client secret or signing keys.
2. An **external grant** on the Space. It names one subject from that connection, a role, and the paths it covers.

A connection admits nobody by itself. Until a Space has an external grant for its issuer, visitors never see the SSO button.
A connection admits nobody by itself. Until a Space has an external grant for its issuer, that issuer cannot admit anyone to the Space.

## Connect an identity provider

Expand All @@ -20,10 +20,10 @@ A connection admits nobody by itself. Until a Space has an external grant for it

| Field | OpenID Connect | White-label signer |
| --- | --- | --- |
| **Name** | What visitors see on the button, such as "Company sign-in" | Such as "Customer portal" |
| **Name** | Label for the connection, such as "Company sign-in" | Such as "Customer portal" |
| **Issuer** | The provider's issuer URL, over HTTPS | The `iss` your portal puts in its proofs, over HTTPS |
| **Client ID** / **Client secret** | From the application you register at the provider | — |
| **Sign-in URL** | — | Where Spacefast sends the visitor to sign in |
| **Sign-in URL** | — | Where your portal handles sign-in |
| **Ed25519 public keys** | — | One `kid:base64url-key` per line, up to 5 |

Only team owners and admins can add, update, or revoke a connection. A team can hold one active connection per issuer.
Expand All @@ -38,17 +38,11 @@ sf share identity create --type oidc --name "Company sign-in" \
sf share identity list
```

### Register Spacefast at your provider
### How Spacefast verifies your provider

When you create the application at your OpenID Connect provider, register this redirect URI:
For an OpenID Connect connection, Spacefast trusts the issuer for OAuth identity assertion grants (ID-JAG). The provider's discovery document at `/.well-known/openid-configuration` has to be reachable over HTTPS, and its `issuer` has to match the one you entered. Spacefast verifies tokens signed with `RS256`, `PS256`, `ES256`, or `EdDSA` against the issuer's JWKS.

```text
https://api.spacefast.com/identity/callback
```

Spacefast uses the authorization code flow with PKCE and asks for the `openid email profile` scopes. The provider's discovery document at `/.well-known/openid-configuration` has to be reachable over HTTPS, and its `issuer` has to match the one you entered. Spacefast accepts ID tokens signed with `RS256`, `PS256`, `ES256`, or `EdDSA`.

Spacefast does not check the provider when you save the connection. A wrong issuer or client secret shows up the first time someone signs in, as an error on the callback.
Spacefast does not fetch the provider's discovery document when you save the connection. A wrong issuer shows up the first time an assertion is verified.

## Grant an identity access

Expand Down Expand Up @@ -78,9 +72,9 @@ The grant appears in [`sf share list`](/cli/reference/share#sf-share-list). To c

## What a visitor sees

On the Space's access page, each connection the Space has a grant for shows as a **Continue with `<name>`** button, next to **Continue with Spacefast** and any password form. The visitor signs in at the provider and comes back to the page they asked for.
Browser visitors sign in to a protected Space through **Continue with Spacefast** on the access page (with team SSO offered there when configured), or through a white-label signer proof exchange. Per-Space OIDC callback buttons are not used.

After sign-in, Spacefast checks the grant against the path the visitor asked for. An identity with no matching grant is refused with "This identity does not have access to that page." Fix that by adding a grant for its subject, or by widening the paths of the one it has.
After sign-in or proof exchange, Spacefast checks the grant against the path the visitor asked for. An identity with no matching grant is refused with "This identity does not have access to that page." Fix that by adding a grant for its subject, or by widening the paths of the one it has.

An admitted visitor holds the same session as any other: it expires after 7 days idle or 30 days absolute, and [`sf access sessions revoke`](/cli/reference/access#sf-access-sessions-revoke) ends it. Each sign-in counts as one use against a grant's `--max-uses`.

Expand All @@ -99,7 +93,7 @@ sf share identity update acn_xxxxxxxx --key k2:AAAA...43chars --key k3:BBBB...43

## Revoke a connection

**Revoke** on a connection ends it, every external grant on the team's Spaces that names its issuer, and every session those grants admitted. The SSO button disappears from each Space's access page.
**Revoke** on a connection ends it, every external grant on the team's Spaces that names its issuer, and every session those grants admitted.

Revoke a connection from the CLI with [`sf share identity revoke`](/cli/reference/share#sf-share-identity-revoke-connection):

Expand Down
Loading