feat(api): enforce roles, org sign-in policies, invitations and api tokens
Every org route resolves a principal from the session or a bearer token and checks a permission. Nobody can grant, revoke or remove more than they hold. Tokens are capped by their owner's current rights and cannot manage credentials. Orgs can require TOTP or SSO; the owner keeps a password fallback for SSO. Closes #6 Closes #7 Closes #8 Closes #9 Closes #41 Closes #45 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3
This commit is contained in:
1 parent
30409697f7
commit
d7d4821e3e
24 files changed
+4677
-439
No files matched your search
@@ -24,24 +24,43 @@
|
||||
"console.monitors.empty": "No monitors yet.",
|
||||
"console.monitors.title": "Monitors",
|
||||
"console.nav.logout": "Sign out",
|
||||
"console.nav.members": "Members",
|
||||
"console.nav.org": "Organization",
|
||||
"console.nav.roles": "Roles",
|
||||
"console.nav.security": "Security",
|
||||
"console.nav.sso": "SSO",
|
||||
"console.totp_missing": "Your organization requires two-factor sign-in.",
|
||||
"console.nav.tokens": "API tokens",
|
||||
"console.sso_required_action": "Sign in with SSO",
|
||||
"console.totp_missing_action": "Set up now",
|
||||
"error.already_assigned": "The member already has this role.",
|
||||
"error.already_member": "This person is already a member.",
|
||||
"error.email_taken": "This email address is already registered.",
|
||||
"error.forbidden": "You are not allowed to do this.",
|
||||
"error.internal": "Internal error.",
|
||||
"error.invalid_code": "Invalid code.",
|
||||
"error.invalid_credentials": "Wrong email or password.",
|
||||
"error.invalid_domain": "One of the domains is not valid.",
|
||||
"error.invalid_email": "Please enter a valid email address.",
|
||||
"error.invalid_input": "Please check your input.",
|
||||
"error.invalid_permissions": "Choose at least one permission.",
|
||||
"error.invalid_slug": "Short name: 2–63 characters, a–z, 0–9 and hyphen.",
|
||||
"error.invitation_email_mismatch": "This invitation was sent to a different email address than the one you are signed in with.",
|
||||
"error.invitation_invalid": "This invitation is invalid, expired or was already used.",
|
||||
"error.mfa_expired": "Sign-in expired, please start again.",
|
||||
"error.no_password": "This account has no password.",
|
||||
"error.not_found": "Not found.",
|
||||
"error.org_not_found": "Organization not found.",
|
||||
"error.owner_cannot_be_removed": "The owner cannot be removed.",
|
||||
"error.owner_has_all_permissions": "The owner already has every permission.",
|
||||
"error.password_too_short": "The password needs at least {{.Min}} characters.",
|
||||
"error.permission_escalation": "You cannot grant permissions you do not hold yourself.",
|
||||
"error.policy_would_lock_you_out": "Your current sign-in does not meet this policy. Meet it first, then turn it on.",
|
||||
"error.rate_limited": "Too many attempts, please try again later.",
|
||||
"error.role_built_in": "Built-in roles cannot be changed.",
|
||||
"error.role_in_use": "The role is still assigned to members.",
|
||||
"error.role_name_taken": "A role with this name already exists.",
|
||||
"error.role_not_found": "Role not found.",
|
||||
"error.session_required": "This action is not available to API tokens.",
|
||||
"error.signup_closed": "Sign-up is disabled.",
|
||||
"error.slug_taken": "This short name is already taken.",
|
||||
"error.sso_denied": "Sign-in was cancelled at the identity provider.",
|
||||
@@ -51,16 +70,64 @@
|
||||
"error.sso_identity_taken": "This SSO sign-in is already linked to another account.",
|
||||
"error.sso_invalid_issuer": "The issuer must be an https URL without query or credentials.",
|
||||
"error.sso_link_required": "An account with this email already exists. Sign in with your password and link SSO under Security.",
|
||||
"error.sso_no_provider": "Add and enable an SSO provider first.",
|
||||
"error.sso_not_member": "Your account is not a member of this organization.",
|
||||
"error.sso_not_provisioned": "No account exists for this sign-in. Ask an administrator to invite you.",
|
||||
"error.sso_provider_error": "The identity provider could not complete the sign-in.",
|
||||
"error.sso_required_by_org": "This organization requires signing in through its SSO provider.",
|
||||
"error.sso_unavailable": "Single sign-on is not available for this organization.",
|
||||
"error.totp_already_enabled": "TOTP is already active.",
|
||||
"error.totp_required_by_org": "One of your organizations requires TOTP.",
|
||||
"error.totp_setup_expired": "Setup expired, please start again.",
|
||||
"error.unauthenticated": "Authentication required.",
|
||||
"error.unsupported_locale": "Unsupported language.",
|
||||
"invite.accept": "Accept invitation",
|
||||
"invite.create_account": "Create account and join",
|
||||
"invite.sign_in": "Sign in to accept",
|
||||
"invite.summary": "You are invited to join {{.Org}} as {{.Role}}.",
|
||||
"invite.title": "Invitation",
|
||||
"lang.de": "Deutsch",
|
||||
"lang.en": "English",
|
||||
"members.assign": "Add role",
|
||||
"members.intro": "Roles decide what each member may do. Nobody can grant permissions they do not hold themselves.",
|
||||
"members.invite": "Invite",
|
||||
"members.invite_link": "Send this link to the invitee. It is valid for 7 days and works once.",
|
||||
"members.invite_submit": "Create invitation",
|
||||
"members.owner": "Owner",
|
||||
"members.pending": "Pending invitations",
|
||||
"members.remove": "Remove from organization",
|
||||
"members.remove_confirm": "Remove this member? Their sessions and API tokens end immediately.",
|
||||
"members.revoke": "Revoke",
|
||||
"members.role": "Role",
|
||||
"members.roles": "Roles",
|
||||
"members.title": "Members",
|
||||
"members.unassign": "Remove role",
|
||||
"org.policy": "Sign-in policy",
|
||||
"org.require_sso": "Require SSO",
|
||||
"org.require_sso_hint": "Members must sign in through this organization's identity provider. The owner can still use a password so a broken IdP cannot lock you out.",
|
||||
"org.require_totp": "Require two-factor sign-in",
|
||||
"org.require_totp_hint": "Members signing in with a password need TOTP. SSO sign-ins rely on the identity provider's MFA.",
|
||||
"org.title": "Organization",
|
||||
"perm.incidents.read": "View incidents",
|
||||
"perm.incidents.write": "Manage incidents",
|
||||
"perm.members.manage": "Invite and manage members",
|
||||
"perm.members.read": "View members and roles",
|
||||
"perm.monitors.read": "View monitors",
|
||||
"perm.monitors.write": "Edit monitors",
|
||||
"perm.notifications.read": "View notification channels",
|
||||
"perm.notifications.write": "Edit notification channels",
|
||||
"perm.org.manage": "Manage organization and SSO",
|
||||
"perm.roles.manage": "Manage custom roles",
|
||||
"perm.statuspages.read": "View status pages",
|
||||
"perm.statuspages.write": "Edit status pages",
|
||||
"roles.built_in": "built-in",
|
||||
"roles.create": "Create role",
|
||||
"roles.delete": "Delete role",
|
||||
"roles.delete_confirm": "Delete this role?",
|
||||
"roles.intro": "Built-in roles cover common cases. Custom roles combine individual permissions.",
|
||||
"roles.title": "Roles",
|
||||
"scope.monitor_group": "monitor group",
|
||||
"scope.status_page": "status page",
|
||||
"security.recovery.left": {
|
||||
"one": "{{.Count}} recovery code left",
|
||||
"other": "{{.Count}} recovery codes left"
|
||||
@@ -92,6 +159,8 @@
|
||||
"sso.field.client_id": "Client ID",
|
||||
"sso.field.client_secret": "Client secret",
|
||||
"sso.field.client_secret_keep": "unchanged",
|
||||
"sso.field.default_role": "Role for new accounts",
|
||||
"sso.field.default_role_viewer": "Viewer (default)",
|
||||
"sso.field.enabled": "Enabled",
|
||||
"sso.field.issuer": "Issuer URL",
|
||||
"sso.field.name": "Name",
|
||||
@@ -99,5 +168,18 @@
|
||||
"sso.settings.intro": "Members of this organization can sign in through your own OpenID Connect identity provider. Register the redirect URL below as an allowed callback at your provider.",
|
||||
"sso.settings.login_url": "Sign-in URL",
|
||||
"sso.settings.redirect_url": "Redirect URL",
|
||||
"sso.settings.title": "Single sign-on"
|
||||
"sso.settings.title": "Single sign-on",
|
||||
"tokens.copy_now": "Copy the token now. It will not be shown again.",
|
||||
"tokens.create": "Create token",
|
||||
"tokens.days": {
|
||||
"one": "{{.Count}} day",
|
||||
"other": "{{.Count}} days"
|
||||
},
|
||||
"tokens.expires": "Expires",
|
||||
"tokens.intro": "Tokens act on your behalf in this organization. They never exceed your own permissions, even if those shrink later.",
|
||||
"tokens.last_used": "Last used",
|
||||
"tokens.never": "never",
|
||||
"tokens.owner": "Owner",
|
||||
"tokens.revoke_confirm": "Revoke this token? Requests using it fail immediately.",
|
||||
"tokens.title": "API tokens"
|
||||
}
|
||||
Reference in new issue
Block a user