diff --git a/docs.json b/docs.json index 3797978..3db4d52 100644 --- a/docs.json +++ b/docs.json @@ -412,7 +412,8 @@ "self-hosted/aws", "self-hosted/sign-in", "self-hosted/roles", - "self-hosted/operations" + "self-hosted/operations", + "self-hosted/releases" ] }, { diff --git a/features/licensing.mdx b/features/licensing.mdx index d55aea1..2a2759b 100644 --- a/features/licensing.mdx +++ b/features/licensing.mdx @@ -30,13 +30,13 @@ Every option starts at 3 seats. | Option | Price | |---|---| -| Monthly | $12 per seat a month. The server has to reach tablepro.app to renew its license | +| Monthly | $12 per seat a month. Each month's license file comes from tablepro.app, so the server needs [license renewal](/self-hosted/operations#renew) turned on and outbound HTTPS to api.tablepro.app | | One-time | $179 per seat with a year of updates, $143.20 from 5 seats and $125.30 from 10. Updates after that are $45, $36 or $31.50 per seat a year, and optional. The discounts from 25 seats do not apply | | Updates after a lapse | Pay for the years missed, never more than a new one-time license | | Paid ahead | 10% off for 2 years, 15% off for 3 years, taken after the seat discount: 50 seats for 3 years are $81.60 per seat a year | | 25 seats or more | 10% off the whole install, 20% from 50 seats, 30% from 100, yearly, monthly or paid ahead | -A renewal keeps its price for as long as you renew, updates included. Payment is by card. A purchase is refunded in full within 14 days while no license file has been issued for it, and renewals are not refunded. A staging install gets a free license with the same seats. Support is by email, with a reply within 2 business days. +A renewal keeps its price for as long as you renew, updates included. Payment is by card. Sign in at [account.tablepro.app](https://account.tablepro.app) with the email address you paid with: **Billing** lists your licenses and downloads each license file, and an email tells you when a new one is there. A purchase is refunded in full within 14 days while no license file has been issued for it, and renewals are not refunded. A staging install gets a free license with the same seats. Support is by email, with a reply within 2 business days. ### Students and teachers diff --git a/self-hosted/aws.mdx b/self-hosted/aws.mdx index 501109f..75e02aa 100644 --- a/self-hosted/aws.mdx +++ b/self-hosted/aws.mdx @@ -26,8 +26,8 @@ Six subnets across two Availability Zones: two for the ALB, two for the task and - **Target group.** Type `ip`, port 8080, health check path `/readyz`, matcher 200, interval 15 seconds, healthy threshold 2, unhealthy threshold 5, deregistration delay 30 seconds. No host rules: the server routes by `Host` itself. - **ALB attributes.** `routing.http.drop_invalid_header_fields.enabled=true`, `routing.http.preserve_host_header.enabled=true`, `routing.http.xff_header_processing.mode=append` (the default), `deletion_protection.enabled=true`. - **Security groups.** The ALB takes 443 and 80 from the clients. The task takes 8080 from the ALB's group only. RDS takes 5432 from the task's group only. -- **Task subnets.** Two of their own, never the ALB's. The task pulls the image from GHCR, and with OIDC it calls the IdP: use private subnets with a NAT gateway, or public subnets with `assignPublicIp`. -- **No egress.** Mirror the image to ECR with `oras cp -r` ([Image and keys](/self-hosted/image#mirror-to-a-private-registry)) and run an OIDC IdP inside the VPC. A SAML IdP needs no route from the task: the browser carries its answer. +- **Task subnets.** Two of their own, never the ALB's. The task pulls the image from GHCR, with OIDC it calls the IdP, and with `LICENSE_RENEWAL=on` it calls `api.tablepro.app` on 443: use private subnets with a NAT gateway, or public subnets with `assignPublicIp`. +- **No egress.** Mirror the image to ECR with `oras cp -r` ([Image and keys](/self-hosted/image#mirror-to-a-private-registry)), run an OIDC IdP inside the VPC, and take a term other than monthly: each license file is then installed by hand. A SAML IdP needs no route from the task: the browser carries its answer. - **Database subnets.** Two more, for RDS's DB subnet group. They need no route out. - **Client address.** `CLIENT_ADDRESS=xff`, with `CLIENT_ADDRESS_TRUSTED_CIDRS` set to the CIDRs of the ALB's subnets. Not the VPC's CIDR: a workload elsewhere in it would set its own rate-limit key. @@ -254,6 +254,8 @@ ARM64, 0.5 vCPU and 1 GB, with `GOMEMLIMIT=700MiB`. `migrate` runs `migrate up` With a SAML IdP, replace `OIDC_ISSUER` and `OIDC_CLIENT_ID` with `SAML_IDP_ENTITY_ID` in every server container: `migrate` and `app` here, and `install` in the [license task definition](#install-the-license). Drop the `OIDC_CLIENT_SECRET` secret. Every server container checks the whole configuration at start, and refuses OIDC settings next to `SAML_IDP_ENTITY_ID`. +With a monthly license, add `{ "name": "LICENSE_RENEWAL", "value": "on" }` to `app`'s `environment`. See [Renew](/self-hosted/operations#renew). + ```bash aws ecs register-task-definition --cli-input-json file://ecs-task-definition.json ``` diff --git a/self-hosted/docker-compose.mdx b/self-hosted/docker-compose.mdx index 69a27b0..fcc93f5 100644 --- a/self-hosted/docker-compose.mdx +++ b/self-hosted/docker-compose.mdx @@ -99,7 +99,7 @@ volumes: # Fill in, then chmod 600 .env. Every variable: https://docs.tablepro.app/self-hosted/settings # The release to run, by version and digest. -TABLEPRO_IMAGE=ghcr.io/tableproapp/tablepro-cloud:0.1.1@sha256: +TABLEPRO_IMAGE=ghcr.io/tableproapp/tablepro-cloud:0.2.0@sha256: # The database password: openssl rand -hex 24. Postgres keeps the first one it starts with. POSTGRES_PASSWORD= @@ -133,6 +133,13 @@ IDP_ADMIN_GROUP_ID= # The sign-in button's name for your identity provider. IDP_DISPLAY_NAME= +# Fetch each new file of the license from tablepro.app once a day: on, or off, the default. A monthly license needs it. +# It sends the installed license file to https://api.tablepro.app and nothing else. +# LICENSE_RENEWAL=on +# A proxy for it. Every outbound call takes it, the OIDC IdP's included: list an IdP inside your network in NO_PROXY. +# HTTPS_PROXY=http://proxy.example.com:3128 +# NO_PROXY=idp.example.com + # The server's signing and encryption keys, as one line from credentials.sh, in single quotes. # Keep a copy offline: a database restored without these keys cannot read the IdP tokens it holds. TABLEPRO_CREDENTIALS= @@ -168,6 +175,8 @@ TABLEPRO_CREDENTIALS= docker compose run --rm --no-deps -T app license install - < license.jwt docker compose run --rm --no-deps app license status ``` + + With a monthly license, also set `LICENSE_RENEWAL=on` in `.env`, then `docker compose up -d`. See [Renew](/self-hosted/operations#renew). Register `https://tablepro-account.example.com/api/auth/oidc/callback` with an OIDC IdP, or set up the SAML application first; see [Sign-in](/self-hosted/sign-in). Then: diff --git a/self-hosted/image.mdx b/self-hosted/image.mdx index db0868a..2861e0f 100644 --- a/self-hosted/image.mdx +++ b/self-hosted/image.mdx @@ -3,22 +3,22 @@ title: Image and keys description: Pull the TablePro server image from GHCR, verify its cosign signature, SBOM and provenance, mirror it to a private registry, and generate the server's keys --- -Pull from `ghcr.io/tableproapp/tablepro-cloud`. It is public, built for `linux/amd64` and `linux/arm64`, and the current release is `0.1.1`. +Pull from `ghcr.io/tableproapp/tablepro-cloud`. It is public and built for `linux/amd64` and `linux/arm64`. The current release is `0.2.0`; [Self-hosted releases](/self-hosted/releases) lists every release and what it changed. | | | |---|---| -| Tags | `X.Y.Z` and `X.Y`, such as `0.1.1` and `0.1`. There is no `latest` | +| Tags | `X.Y.Z` and `X.Y`, such as `0.2.0` and `0.2`. There is no `latest` | | Base | `gcr.io/distroless/static-debian13:nonroot`. No shell | | User | 65532. The root filesystem can be read-only | | Entry point | `/tablepro-cloud`, default command `serve`, listening on `:8080` | -| `version` | Prints the release, such as `0.1.1` | +| `version` | Prints the release, such as `0.2.0` | | Third-party notices | `/usr/share/doc/tablepro-cloud/THIRD_PARTY_NOTICES` | | Amazon RDS CA bundle | `/etc/ssl/rds-global-bundle.pem`, for `sslrootcert` in `DATABASE_URL` | -Deploy by digest, not by tag. Get the index digest with: +Deploy by digest, not by tag. The index digest of `0.2.0` is `sha256:de9130a22de1439e917fa621b9b22af62fd080ac9cf848b19b2e3e4c1d1885d8`. Check it, or get another release's, with: ```bash -docker buildx imagetools inspect ghcr.io/tableproapp/tablepro-cloud:0.1.1 +docker buildx imagetools inspect ghcr.io/tableproapp/tablepro-cloud:0.2.0 ``` `Digest:` at the top is the index digest. Each entry under `Manifests:` names one platform's digest. @@ -57,7 +57,7 @@ The signatures are also in Sigstore's public Rekor log, which `cosign verify` ch ### Mirror to a private registry ```bash -oras cp -r ghcr.io/tableproapp/tablepro-cloud@sha256: registry.example.com/tablepro-cloud:0.1.1 +oras cp -r ghcr.io/tableproapp/tablepro-cloud@sha256: registry.example.com/tablepro-cloud:0.2.0 ``` ORAS 1.3 or later copies the signatures and attestations with the image, since cosign 3 stores them as OCI referrers. `cosign copy` 3.1 leaves them behind. Run the verify commands against the mirror afterwards. @@ -117,10 +117,10 @@ Run it once per install, with the image by digest, and with your SAML IdP's meta chmod +x credentials.sh # OIDC -./credentials.sh ghcr.io/tableproapp/tablepro-cloud:0.1.1@sha256: > credentials.json +./credentials.sh ghcr.io/tableproapp/tablepro-cloud:0.2.0@sha256: > credentials.json # SAML 2.0: the IdP's metadata file as the second argument -./credentials.sh ghcr.io/tableproapp/tablepro-cloud:0.1.1@sha256: idp-metadata.xml > credentials.json +./credentials.sh ghcr.io/tableproapp/tablepro-cloud:0.2.0@sha256: idp-metadata.xml > credentials.json ``` diff --git a/self-hosted/index.mdx b/self-hosted/index.mdx index 54de691..aa728d3 100644 --- a/self-hosted/index.mdx +++ b/self-hosted/index.mdx @@ -3,7 +3,7 @@ title: Self-hosted server description: What the Enterprise Self-Hosted preview runs, what it needs from your infrastructure, the order to set it up in, and its limits --- -One OCI image serves your teams and their Team Library to the Macs, from your own PostgreSQL. People sign in through your identity provider. The server sends no email and no telemetry and never calls tablepro.app. Its only outbound calls go to an OIDC identity provider. +One OCI image serves your teams and their Team Library to the Macs, from your own PostgreSQL. People sign in through your identity provider. The server sends no email and no telemetry. Its only outbound calls go to an OIDC identity provider and, when you turn on [license renewal](/self-hosted/operations#renew), to tablepro.app for the license's next file. This is a preview. It serves TablePro for macOS. The other apps follow. To try it, write to [hello@tablepro.app](mailto:hello@tablepro.app) with the subject "TablePro Enterprise Self-Hosted"; plans and prices are under [Enterprise Self-Hosted](/features/licensing#enterprise-self-hosted). diff --git a/self-hosted/operations.mdx b/self-hosted/operations.mdx index 2e283e6..0f8382d 100644 --- a/self-hosted/operations.mdx +++ b/self-hosted/operations.mdx @@ -20,11 +20,20 @@ The license file is one signed line of text that TablePro issues for your API ad ### Renew -A renewal, or a change of seats, is a new file: install it the same way. A file with fewer seats than are taken keeps everyone who has one, and no one new signs in until enough seats are freed under [Remove someone](/self-hosted/roles#remove-someone). +A renewal, or a change of seats, is a new file of the same license. Sign in at [account.tablepro.app](https://account.tablepro.app) with the email address you paid with: **Billing** lists your licenses under **Self-hosted licenses**, each with **Download**, and an email tells you when a new file is there. Install it as above, or let the server fetch it. A file with fewer seats than are taken keeps everyone who has one, and no one new signs in until enough seats are freed under [Remove someone](/self-hosted/roles#remove-someone). + +To fetch renewals, set `LICENSE_RENEWAL=on`. It is off by default, and with it off the server makes no call to tablepro.app. Once a day, and at each start, the server asks `https://api.tablepro.app/v2/licenses/latest` for the newest file of its license. The first fetch runs about a minute after the server starts. It sends the installed file and nothing else: no seat count, usage or version. + +- The server fetches renewals only from a file tablepro.app issued through **Billing**. An evaluation file fetches nothing: install the first file from **Billing** by hand, and the server fetches from then on. Until then, each try logs `license renewal failed`. +- It installs the answer only when it is a later file of the same license for the same address, after the checks `license install` makes. The audit log records it as `license.installed` with `source` `renewal`. +- A failed fetch logs `license renewal failed` and tries again the next day. The installed file keeps working to the end of its grace, and the file from **Billing** still installs by hand. +- A monthly license needs it. A server that cannot reach tablepro.app takes a yearly or longer term. + +Behind a proxy, set `HTTPS_PROXY`, such as `http://proxy.example.com:3128`. Every outbound call of the server then goes through it, the OIDC identity provider's too: list an IdP inside your network in `NO_PROXY`. A proxy that inspects TLS needs its CA in `SSL_CERT_FILE`, as under [Settings](/self-hosted/settings#identity-provider). ### When a license ends -A file with an end date has a grace after it, written into the file: 7 days for a monthly license, 30 days for every other. +A file with an end date has a grace after it, written into the file: 21 days for a monthly license, 30 days for every other. | State | From | What works | |---|---|---| @@ -36,6 +45,8 @@ A perpetual file has no end date. It covers every release dated up to its end of ## Upgrades +Read the release's notes under [Self-hosted releases](/self-hosted/releases) first. + - **One minor version at a time**, such as 0.1 to 0.2, then 0.2 to 0.3. Each release's migrations only promise that the release before it runs on the new schema. To skip a minor version, stop the old server first. - **Back up first**, as under [Back up](#back-up). Migrations only go forward, so going back to the earlier release means restoring the backup taken before the upgrade. - **A perpetual license** must cover the new release; `migrate up` refuses it otherwise, before it changes anything. @@ -90,8 +101,8 @@ On AWS, RDS keeps automated backups. Before each upgrade, also take a manual sna ```bash aws rds create-db-snapshot --db-instance-identifier \ - --db-snapshot-identifier tablepro-before-0-1-1 --query 'DBSnapshot.Status' --output text -aws rds wait db-snapshot-available --db-snapshot-identifier tablepro-before-0-1-1 + --db-snapshot-identifier tablepro-before-0-2-0 --query 'DBSnapshot.Status' --output text +aws rds wait db-snapshot-available --db-snapshot-identifier tablepro-before-0-2-0 ``` ## Restore a backup @@ -136,14 +147,17 @@ The server writes one JSON object per line to standard output, with `level` and | The ALB's `UnHealthyHostCount` at 1 or more for 5 minutes, and `HTTPCode_Target_5XX_Count` | The server is down or failing requests | | RDS `FreeStorageSpace` under 2 GB, `CPUCreditBalance` running low, `FreeableMemory` | The database is running out of room | -The server also logs these events once a day and at each start. A metric filter `{ $.msg = "license*" }` catches the license ones, along with `license active` at INFO. +The server also logs these events once a day and at each start. A metric filter `{ $.msg = "license*" && $.level != "INFO" }` catches the license ones and leaves out `license active` and `license renewed`. | `msg` | Level | When | |---|---|---| | `license not installed` | WARN | No license file verifies | -| `license expires soon` | WARN | From 30 days before the end date | +| `license expires soon` | WARN | From 30 days before the end date, unless `LICENSE_RENEWAL=on` | | `license expired, in grace` | WARN | Past the end date, within the grace | | `license lapsed, library pushes refused` | ERROR | Past the grace | +| `license renewal failed` | WARN | With `LICENSE_RENEWAL=on`: no route, a proxy that refused, tablepro.app down, or an answer the server does not take. It tries again the next day | +| `license renewed` | INFO | With `LICENSE_RENEWAL=on`: a later file was installed | +| `license renewal found no newer file` | INFO | With `LICENSE_RENEWAL=on`: nothing newer yet | | `license maintenance ends soon` | WARN | A perpetual file, in the 30 days before its maintenance ends | | `idp certificate expiring` | WARN | A trusted SAML signing certificate ends within 30 days | | `idp certificate expired` | ERROR | A trusted SAML signing certificate has ended, and sign-ins it signs fail | diff --git a/self-hosted/releases.mdx b/self-hosted/releases.mdx new file mode 100644 index 0000000..c2aba43 --- /dev/null +++ b/self-hosted/releases.mdx @@ -0,0 +1,51 @@ +--- +title: Self-hosted releases +description: What each release of the self-hosted TablePro server image changed, its index digest, and what to do when you upgrade to it +--- + +Read the entry for a release before you upgrade to it, then follow [Upgrades](/self-hosted/operations#upgrades). Each entry names the release's index digest; [Image and keys](/self-hosted/image#verify-the-image) shows how to verify it. + + + Index digest `sha256:de9130a22de1439e917fa621b9b22af62fd080ac9cf848b19b2e3e4c1d1885d8`, tags `0.2.0` and `0.2`. + + - `LICENSE_RENEWAL=on` fetches each new file of the license from tablepro.app once a day and at each start, and installs it. It is off by default, and with it off the server makes no call to tablepro.app. A monthly license needs it. See [Renew](/self-hosted/operations#renew). + - `HTTPS_PROXY` and `NO_PROXY` send the server's outbound calls through a proxy, the OIDC IdP's included. + - Changing a role, removing or restoring someone, transferring a team, inviting an admin and creating a team API token need a sign-in from the last 5 minutes. The portal sends the person back to the IdP with OIDC's `max_age=0` and `prompt=login`, or SAML's `ForceAuthn`. See [Step-up](/self-hosted/sign-in#step-up). + - Through the API, a sign-in from an app no longer changes a team role, removes a member or invites an admin: it gets 403 `app_sign_in_forbidden`. A team API token still does. + - New log events: `license renewal on` at start, `license renewed`, `license renewal found no newer file`, and `license renewal failed` at WARN. With `LICENSE_RENEWAL=on`, `license expires soon` is not logged. See [Alerts](/self-hosted/operations#alerts). + - `license.installed` in the audit log carries `source`: `command` for `license install`, `renewal` for a fetched file. + - Each authorization response to an app names the server as its issuer (RFC 9207). + - A monthly license file now comes with 21 days of grace, up from 7. + + To upgrade, from 0.1.0 or 0.1.1: + + - Take a backup first. `migrate up` applies migrations 00036 to 00039, which add tables and columns, and going back to 0.1 means restoring the backup. + - Before the upgrade, check that your IdP signs people in again when asked. Okta over SAML needs **Honor Force Authentication**, and Identity Center a short session; see [Step-up](/self-hosted/sign-in#step-up). After it, change one role to try it. + - To fetch renewals, add `LICENSE_RENEWAL=on` to the server's settings, with `HTTPS_PROXY` and `NO_PROXY` behind a proxy. + + + + Index digest `sha256:53e7e128188f1c996f20cd3b8f2dbffa2b28642ed6b7179073a96fe8accde5e7`, tags `0.1.1` and `0.1`. + + - A command that fails, a `serve` that refuses to start and `migrate up` included, writes one JSON line to standard error, with `"level":"ERROR"`, `"msg":"command failed"`, `command` and `error`, and exits 1. 0.1.0 wrote plain text there, which a filter on the JSON logs missed. + - Wrong arguments still print the error and the usage as plain text, and exit 2. Alert on the exit code for those; see [Alerts](/self-hosted/operations#alerts). + - An error for a `DATABASE_URL` that does not parse no longer repeats the URL, so a password in it stays out of the logs. + - A configuration error starts with `load config:` once, not twice. + + From 0.1.0, there is no migration to apply. + + + + Index digest `sha256:4dc7b94fa821edf7647caacdfdf6bb410227b131a26dcdf3715e21ef369bd5e3`, tag `0.1.0`. + + The first release of the Enterprise Self-Hosted preview. + + - One image for `linux/amd64` and `linux/arm64`, signed with cosign, with an SPDX SBOM and SLSA v1 provenance on each platform. + - Reference deploys for Docker Compose and for AWS Fargate, on PostgreSQL 18. + - Sign-in through one IdP, over OpenID Connect or SAML 2.0, with an optional IdP group for the server's admins. + - Server roles owner, admin and member, and team roles owner, admin, editor and member. + - Team Library sync for TablePro on macOS. + - An offline license file for the API address sets the seats, the features and the end, installed with `license install`. + - JSON log lines on standard output, with the license and IdP certificate events once a day and at each start. + - Migrations 00001 to 00035. + diff --git a/self-hosted/roles.mdx b/self-hosted/roles.mdx index 1ae87ef..8e16634 100644 --- a/self-hosted/roles.mdx +++ b/self-hosted/roles.mdx @@ -5,6 +5,8 @@ description: The server's owner, admins and members, the owner, admin, editor an A self-hosted server has two layers of roles. The server role decides who runs the server: who creates teams and who removes people. The team role decides what someone does inside one team, as on tablepro.app. +Changing a role, removing or restoring someone, transferring a team and creating a team API token each need a fresh sign-in through the IdP; see [Step-up](/self-hosted/sign-in#step-up). + ## Server roles | Role | Can | diff --git a/self-hosted/settings.mdx b/self-hosted/settings.mdx index e06915e..dae0a98 100644 --- a/self-hosted/settings.mdx +++ b/self-hosted/settings.mdx @@ -50,7 +50,7 @@ Set exactly one of `OIDC_ISSUER` and `SAML_IDP_ENTITY_ID`. That choice picks the | `OIDC_GROUPS_CLAIM` | `groups` | The claim that lists a person's groups | | `SAML_IDP_ENTITY_ID` | | The IdP's `entityID`, as its metadata states it, at most 1024 characters. Any `OIDC_CLIENT_ID`, `OIDC_CLIENT_SECRET`, `OIDC_SCOPES` or `OIDC_GROUPS_CLAIM` with it stops the server | -An IdP behind a private CA: set `SSL_CERT_FILE` to a bundle that holds the public roots and that CA, or `SSL_CERT_DIR` to a directory of them, mounted into the container. On Fargate that takes an image built `FROM` this one by digest, with the bundle added. +An IdP behind a private CA, or a proxy that inspects TLS: set `SSL_CERT_FILE` to a bundle that holds the public roots and that CA, or `SSL_CERT_DIR` to a directory of them, mounted into the container. On Fargate that takes an image built `FROM` this one by digest, with the bundle added. ## Sessions @@ -62,6 +62,14 @@ An IdP behind a private CA: set `SSL_CERT_FILE` to a bundle that holds the publi Durations take Go's form: `90m`, `10h`, `168h`. [Sign-in](/self-hosted/sign-in#sessions) covers what ends a session. +## License renewal + +| Variable | Default | Meaning | +|---|---|---| +| `LICENSE_RENEWAL` | `off` | `on` fetches the license's next file from tablepro.app once a day and at each start; any other value stops the server. See [Renew](/self-hosted/operations#renew) | +| `HTTPS_PROXY` | | The proxy every outbound HTTPS call goes through, such as `http://proxy.example.com:3128` | +| `NO_PROXY` | | Comma-separated hosts reached without the proxy, such as an IdP inside your network | + ## Keys `TABLEPRO_CREDENTIALS` holds the server's keys as one JSON object, from each credential's name to the file's contents. [Image and keys](/self-hosted/image#generate-the-keys) makes it. `serve` refuses to start without `oauth-access`, `entitlement` and an `identity-tokens.`. diff --git a/self-hosted/sign-in.mdx b/self-hosted/sign-in.mdx index c34b234..c80023a 100644 --- a/self-hosted/sign-in.mdx +++ b/self-hosted/sign-in.mdx @@ -1,6 +1,6 @@ --- title: Sign-in through your IdP -description: Connect the self-hosted TablePro server to AWS IAM Identity Center, another SAML 2.0 IdP such as OneLogin, or an OpenID Connect IdP, and how long sessions last +description: Connect the self-hosted TablePro server to AWS IAM Identity Center, another SAML 2.0 IdP such as OneLogin, or an OpenID Connect IdP, how long sessions last, and the fresh sign-in a role change needs --- People sign in to the portal, and through it to the Mac, with one identity provider, over SAML 2.0 or OpenID Connect. `SAML_IDP_ENTITY_ID` or `OIDC_ISSUER` picks which; set exactly one. @@ -44,7 +44,7 @@ Identity Center connects an outside application over SAML 2.0 from an organizati ``` - Under **Application properties**, set **Application start URL** to `https://tablepro-account.example.com/api/auth/saml/start`, so the access portal's tile starts a sign-in the server accepts. Leave **Relay state** empty. The server does not read **Session duration**. + Under **Application properties**, set **Application start URL** to `https://tablepro-account.example.com/api/auth/saml/start`, so the access portal's tile starts a sign-in the server accepts. Leave **Relay state** empty. The server does not read the application's **Session duration**. Under **Application metadata**, choose **Manually type your metadata values**. Set **Application ACS URL** to `https://tablepro-account.example.com/api/auth/saml/callback` and **Application SAML audience** to `https://tablepro-account.example.com/api/auth/saml/metadata`. Choose **Submit**. @@ -84,6 +84,11 @@ Identity Center connects an outside application over SAML 2.0 from an organizati `GroupId` in the answer is the value. + + A [step-up](#step-up) through Identity Center proves only that the person's Identity Center session is still alive. Keep that session short. In the IAM Identity Center console, choose **Settings**, open the **Authentication** tab, and choose **Configure** next to **Session duration**. Under **User interactive sessions**, set 15 minutes, the minimum, and choose **Save**. + + The same duration applies to the AWS access portal, so people sign in there again every 15 minutes too. It applies only to sessions that start after the change. See AWS's [User interactive sessions](https://docs.aws.amazon.com/singlesignon/latest/userguide/user-interactive-sessions.html). + @@ -197,3 +202,19 @@ Every `UPSTREAM_REVALIDATE`, an hour by default, an app's refresh asks the IdP a An app's session counts from the portal sign-in that approved it. SAML has no refresh, so the server asks a SAML IdP nothing after the sign-in, and an admin group change takes effect at the person's next sign-in. Removing someone at the IdP ends their sessions within those caps, or at the next check for an OIDC IdP that gives refresh tokens. The team API tokens they created and the invitation links they were handed stay until they are removed in the portal; see [Remove someone](/self-hosted/roles#remove-someone). + +## Step-up + +These changes in the portal need a sign-in from the last 5 minutes: + +- on **Server > Members**: **Make admin**, **Make member**, **Remove from server…** and **Restore…**; +- in a team: changing a member's role, removing a member, inviting an admin or making a new link for that invitation, transferring ownership, and creating an API token. + +Without one, the portal shows **Confirm it's you**, and **Sign in again** sends the person through the IdP and back to the page, where they make the change again. The server asks the IdP to authenticate them again rather than answer from its session: OIDC's `max_age=0`, `prompt=login` unless the IdP's discovery leaves it out, and `auth_time` as an essential claim; SAML's `ForceAuthn`. It then reads when the IdP says the person authenticated, from `auth_time` or the assertion's `AuthnInstant`. No time, or a time more than 3 minutes before the sign-in started, confirms nothing: the portal says "Your organization's sign-in didn't ask you to sign in again, so nothing was confirmed", and the server logs `the IdP's answer does not show it authenticated the person again` at WARN. + +- **AWS IAM Identity Center.** Identity Center does not sign you in again for a stepped-up change; it only checks your session. Set its session duration short, as in the last step under [AWS IAM Identity Center](#aws-iam-identity-center). +- **Okta over SAML.** In the app's **General** tab, edit **SAML Settings**, choose **Show Advanced Settings**, and set **Honor Force Authentication** to **Yes**. With **No**, Okta ignores `ForceAuthn`. + + +After the owner's first sign-in, change someone's role or remove someone once, and sign in again when the portal asks. The change goes through. +