mirror of
https://github.com/hanzoai/iam.git
synced 2026-11-21 02:59:42 +00:00
The verification_uri and verification_uri_complete a device is handed are on the
origin of the application's signinUrl when the operator has configured that origin
as a sign-in origin of the request's issuer (IAM_FEDERATION_ORIGIN_MAP), and on the
issuer otherwise. The application says; the operator decides, so a tenant-written
signinUrl can only select among configured origins and an origin of another brand is
refused as the boot check refuses a map that would send one there. Only the origin
is taken. The issuer, discovery and the JSON endpoints do not move.
signinUrl is declarable: the upsert takes it (a pointer: omitted preserves, "" clears,
anything but an https URL is refused) and the provision document carries it per app
(`signin:`).
A person can refuse: POST /v1/iam/login {type:"device", userCode, deny:true} on the
approval's own seam (session, same-origin JSON, the account the page showed, the
tenant boundary). The device's next poll is access_denied once and the code is dead
after; approve, look-up and a second refusal find it spent (one `pending`).
device/info names the account an approval would be made as, so the page returns it
as the approval's loginHint.
Claude-Session: https://claude.ai/code/session_015XYKLnjAuGqkk4ssA1Jusy
25 lines
4.7 KiB
Go
25 lines
4.7 KiB
Go
// Code generated by zipdoc; DO NOT EDIT.
|
|
|
|
package bootstrap
|
|
|
|
import (
|
|
"github.com/zap-proto/zip"
|
|
)
|
|
|
|
func init() {
|
|
zip.Describe("github.com/hanzoai/iam/internal/bootstrap POST /v1/iam/admin/applications/upsert", zip.Doc{
|
|
Description: "Creates an application or updates it in place, so a\ndeployment can declare the applications it needs and run the same declaration\non every environment and on every redeploy.\n\nIt says which of the two it did. Leave the client secret out and the existing\none is kept — so re-running your deployment does not rotate a credential your\nrunning services are holding.",
|
|
Fields: map[string]string{
|
|
"registration.enableCodeSignin": "EnableCodeSignin offers sign-in by an emailed or texted one-time code\nbeside the password. A POINTER for the same reason as IsShared: a plain\nbool reads as false on every reconcile that says nothing and would switch\nthe method off for every app whose caller never mentioned it.",
|
|
"registration.enableSignUp": "EnableSignUp opens the application to self-service registration (password,\nemail code, OAuth federation, wallet) and identifier-first address lookup.\nA POINTER so a reconcile that omits it preserves the stored setting.",
|
|
"registration.expireInHours": "ExpireInHours and RefreshExpireInHours are the application's token\nlifetimes. They are the ONLY declarative way to say that a refresh token\nmust OUTLIVE its access token: with neither stated, oidc.refreshTTL clamps\nthe refresh lifetime to the access lifetime, so the refresh_token grant the\nregistration advertises expires at the same instant as the token it was\nmeant to renew and can never be exercised. `hanzo-cli` sat in exactly that\nstate — a browser re-login every hour, and a live refresh returning 401.\n\nPOINTERS, for the same reason as IsShared: a plain float would read as 0 on\nevery reconcile that says nothing and reset a deliberate lifetime back to\nthe default. Nil means \"not stated, leave it\".",
|
|
"registration.isShared": "IsShared declares that this application serves EVERY organization, not only\nthe one named in Organization. It is the honest description of a brand app —\nhanzo-id, hanzo-chat, a brand console — whose customers each live in their own\ntenant: self-service onboarding moves a founder OUT of the brand org, so\n`user.Owner != app.Organization` is the steady state and the app really does\nserve every org. Application.ServesOrg reads it as one of the three ways to\nsay yes.\n\nA POINTER because omission must PRESERVE. This upsert is the operator's\nsteady-state reconcile and most callers say nothing about sharing; a plain\nbool would read as false on every one of them and silently un-share an app —\nthe same shape of accident that de-secreted apps through update-application.\nNil means \"not stated, leave it\"; only an explicit true or false moves it.",
|
|
"registration.public": "Public declares a client that CANNOT hold a credential — a browser SPA,\na CLI, a desktop app. It proves itself with PKCE instead, and the token\nendpoint treats \"no stored secret\" as exactly that (token.go: a secret is\nverified only when one is stored). Without this flag every upsert minted\na secret, so a public client could never be registered at all and its\nbrowser code->token exchange 401'd `invalid_client` forever.",
|
|
"registration.signinUrl": "SigninUrl is where this application's people sign in, when that is not the\nissuer: the origin of the page IAM sends them to for the approval of a\ndevice sign-in, and the hosted login of an authorize request. An absolute\nhttps URL, or \"\" to say the issuer. A POINTER so a reconcile that omits it\npreserves what the application has. IAM prints it only for an origin the\noperator configured as a sign-in origin of the issuer (oidc verificationOrigin).",
|
|
},
|
|
})
|
|
zip.Describe("github.com/hanzoai/iam/internal/bootstrap POST /v1/iam/admin/users/upsert", zip.Doc{
|
|
Description: "Creates a person or updates them in place, so a deployment can\ndeclare the accounts it needs and re-run that declaration safely.\n\nIt DESCRIBES an account it meets and GRANTS only to one it creates: org-admin is\nnever raised on a row that already exists, and a machine identity is answered by\nname rather than adopted. Both are properties of the update itself, so a\nsteady-state reconcile — which changes neither — is unaffected.\n\nPasswords are hashed before they are stored. Leave the password out and their\ncurrent one is kept, so a redeploy never locks somebody out; send the same one\nagain and it is kept too, so a steady-state re-run is not a rotation.\n\nA SuperAdmin's password, email and phone are set when the account is created\nand kept on every run after.",
|
|
})
|
|
}
|