Skip to main content

Turn On Organization IAM

Organization IAM is turned on per service and takes effect with the next deployment. Nothing is created in the organization's IAM: the application uses the same sign-in as the Zero console. There is no client to request from anyone and no step for the IAM administrator.

Before You Begin​

  • The service is a web application with Zero's public address.
  • The organization has its IAM connected to Zero (it is the sign-in you use in the console).
  • You can change the service in the project.
  • In the console: on the web service page, the Login and data → Organization sign-in → Turn on card, or under the project's Settings → Login and data, on the service's row. With the CLI (or the API, PUT /services/{id}/capabilities/organization-iam), as below.
  • Have the service ID (svc_…) at hand: the commands take the ID, not the name — a name answers "not found" (exit code 6). The ID is what zero services create prints and what appears in the ID column of zero services list.

Step by Step​

  1. Turn the capability on:

    zero services enable organization-iam svc_…

    The response starts with IAM da Organização: habilitado (Organization IAM: enabled). Then come the state, the organization, the IAM, the sign-in return address and the next step.

  2. Deploy:

    zero deploy svc_…
  3. Check it end to end:

    zero services doctor organization-iam svc_…

    Each check comes out with ✓ or ✗ and, when something is missing, says who fixes it. While something is missing, the command exits with code 3.

    Check (as shown)Who fixes it
    O projeto pertence à organização, e o login é o do IAM dela (the project belongs to the organization, and the sign-in is its IAM's)the platform
    O IAM/OIDC da organização está configurado (the organization's IAM/OIDC is configured)the platform
    O broker de identidade está disponível (the identity broker is available)the platform
    O serviço é web e tem endereço público (the service is web and has a public address)the application
    A aplicação está com o IAM da organização ligado (the application has Organization IAM on)the application
    A publicação no ar já passa o login pela borda (the deployment in service already passes sign-in through the edge)the application
  4. In your code, read who signed in with nn.auth.user(req). See Who Signed In, in Your Code.

  5. Optional: to query the organization's QueryMesh with the same identity, also turn on zero services enable querymesh svc_… (in the console, Infinite Data access). It takes effect immediately, without deploying. See Query the Organization's QueryMesh.

With the sign-in on, the application is in the Private mode: only who is allowed gets in. The lists of people and groups, and opening it to the organization, are on the same service page, right below the sign-in — see who gets in.

To turn it off, use zero services disable organization-iam svc_… (in the console, Organization sign-in → Turn off), which answers IAM da Organização: desligado (Organization IAM: off). Sign-in leaves with the next deployment, and after it the application's sessions are ended. Nothing changes in the organization's IAM. With QueryMesh on in the application, Organization IAM cannot be turned off: turn QueryMesh off first, with zero services disable querymesh svc_….

The States​

State (as shown)What it meansWhat to do
Desligada (off)the capability is not on—
Entra na próxima publicação (next deployment)everything is readyzero deploy
Pronta (ready)the deployment in service requires sign-in—
Falta configurar na organização (missing organization setup)the organization's IAM is not ready for the Zero sign-in; the reason comes with itthe platform administrator checks the organization's IAM; sign-in comes back on its own afterwards
Falta a identidade da aplicação (missing application identity)the capability is on, but the platform did not record the application's identityturn it on again: zero services enable organization-iam svc_…
Sai na próxima publicação (leaves with the next deployment)turned off, with the deployment in service still requiring sign-inzero deploy
Encerrando as sessões (ending sessions)turned off and already deployed; the platform ends the application's sessionswait

Common Errors​

SymptomCauseWhat to do
ORGANIZATION_IAM_NOT_CONFIGURED when turning it onthe organization does not have its IAM connected to Zeroask the platform administrator to connect the organization's IAM
SERVICE_CAPABILITY_UNSUPPORTED when turning it onthe service is not a web application or has no public addressturn it on in the web service that receives people
SERVICE_CAPABILITY_REQUIRES_IDENTITY when turning it offQueryMesh is on in the applicationzero services disable querymesh svc_…, then turn IAM off again
the application sees no one after sign-inthe deployment in service predates the capabilityzero deploy svc_… and check with zero services doctor organization-iam svc_…
sign-in answers that it is not availablethe organization's IAM is not ready for the Zero sign-inzero services doctor organization-iam svc_…; the platform administrator fixes it
ORGANIZATION_IAM_NOT_ENABLED in the application logthe application ran without the capability, or outside Zeroturn the capability on and deploy

Next Steps​