# What is Identity and Access Management?

Identity and Access Management decides who may do what in your organization, for every request from the console, the API, the CLI and the other ways in.

Every member of your organization has an IAM user, and every IAM user holds policies. A request is
answered by evaluating those policies against one action, such as `ec2:StartInstances`, and one
resource name. There is no bypass: the organization owner is allowed because a policy
(`AdministratorAccess`) says so, and that policy is evaluated like everyone else's. You find the
service under **Identity** in the Deutsche Cloud Console.

## When to use it

- You invite colleagues and decide what each of them may do.
- A program, a CI job or a tool needs its own credential: an IAM user of type service account with
  an access key, or a role that a GitHub Actions job assumes with its own OIDC token.
- You want to limit someone to one repository, database, zone or secret, or to keep one resource
  safe from everybody with an explicit `Deny`.
- You want to know why a request was refused: the policy simulator names the deciding statement.

## Concepts

| Term                   | Meaning                                                                                                                                                                                        |
| ---------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Organization**       | What every resource, user, key and bill belongs to.                                                                                                                                            |
| **Member**             | A person who signs in with their own email address. Every member has an IAM user behind them that carries their permissions.                                                                   |
| **IAM user**           | The principal permissions attach to: a member's, one you create for someone who signs in with a user name, or a service account for a program.                                                 |
| **Group**              | A set of IAM users. Every member of a group holds every policy attached to it.                                                                                                                 |
| **Role**               | A set of policies you assign to IAM users, or that a workload assumes with an OIDC token.                                                                                                      |
| **Policy**             | A JSON document of `Allow` and `Deny` statements over actions and resource names.                                                                                                              |
| **Managed policy**     | A policy maintained by Deutsche Cloud, such as `AdministratorAccess` or `Ec2ReadOnlyAccess`. You attach it; you cannot edit it.                                                                   |
| **Preset role**        | What an invitation or a first single sign-on gives a member: `Admin`, `Member`, `Viewer` or `Billing`, each attaching one managed policy, or, for an invitation only, no preset and no policy. |
| **Action**             | `<service>:<Action>`, such as `ec2:StartInstances`.                                                                                                                                            |
| **Resource name (RN)** | `rn:ews:<region>:<organization id>:<service>:<type>/<id>`: what a statement applies to.                                                                                                        |
| **Access key**         | A credential that acts as one IAM user outside the browser.                                                                                                                                    |
| **Identity provider**  | An OIDC issuer, such as GitHub Actions, whose tokens a role may accept.                                                                                                                        |
| **Single sign-on**     | A connection to your company's identity provider (OpenID Connect or SAML 2.0) that people sign in to the console through.                                                                      |

More in [Principals and policies](principals-and-policies.md) and
[Policy documents](policy-documents.md).

## Pricing

Identity and Access Management is not charged: users, groups, roles, policies, access keys,
identity providers and single sign-on connections cost nothing.

## Interfaces

- The Deutsche Cloud Console, under **Identity**. Members and invitations are under **Settings** →
  **Members**.
- The CLI: `dcloud iam …`; see the _CLI Command Reference_.
- The HTTP API under `/iam/api`; see the _API Reference_.
- Terraform: `dcloud_iam_user`, `dcloud_iam_group`, `dcloud_iam_group_membership`, `dcloud_iam_policy`,
  `dcloud_iam_role`, the `…_policy_attachment` resources, `dcloud_iam_user_role_assignment`,
  `dcloud_iam_grant`, `dcloud_iam_access_key`, `dcloud_iam_oidc_provider`, `dcloud_iam_sso_connection`,
  `dcloud_iam_sso_domain`, `dcloud_iam_user_login_profile` and `dcloud_iam_password_policy`.

## Next steps

- [Getting started](getting-started.md): a group, a policy and a user in ten minutes.
- [How a request is decided](how-a-request-is-decided.md)
- [Invite a person](invite-a-person.md)
