Skip to content

3. The register and the passes

The register office of the town hall.

At the counter of the register, under the arches of the town hall, Maë, with short silver hair and a brown waistcoat, smiles at LUMO, who has just been handed the plain brass token now lying on the counter.

The first office past the door belongs to Maë, who keeps the register. Nobody gets further without going through it. LUMO gives a name and a password; Maë checks them against the register and hands over a small brass token, plain and unengraved.

"With this you can ask the other offices for things," Maë says. "They will look at the token, and at your role, to decide what you may do." LUMO turns the token over. "And how do I find the other offices?" Maë unrolls a long sheet: the catalog. Every office of the town hall is on it, with the address where it answers.

At the counter of the register, Maë unrolls a long parchment catalog where each office of the town hall is drawn as a small door, while LUMO, the brass token in hand, follows one of the doors with a finger.

LUMO notices something: Maë does not walk anyone to the other offices, and does not build anything. The register says who you are, what you may do, and where to go. The rest is up to you and to the other offices.

LUMO points at a large stone board with a small door for each office of the town hall, each marked with a simple symbol, while Maë watches.

Important

Where the picture stops. The catalog says where to reach a service; Keystone does not build the machine and does not route the requests itself. A token is not a key to every door: what it allows depends on the roles given in a scope, and on each service's own policy.

What it is in OpenStack

Keystone is the identity service. Every request to any OpenStack service carries a token that Keystone issued and that the service checks.

  • Users (and groups) prove who they are, usually with a password or an application credential.
  • Roles say what a user may do (member, reader, admin…), always in a scope: a project or a domain.
  • A token is a short-lived proof of identity and scope. Clients get one and send it with every request.
  • The service catalog lists each service and its endpoints: the URLs where its API answers. Clients read it to know where to send each request.

On the left, the keeper of the register hands LUMO a plain brass token across the counter of the town hall; on the right, a drawing shows an identity card and a role combining into one token, and a catalog that points to the doors of three services.

From the village to OpenStack

sequenceDiagram
    participant N as Neri (client)
    participant K as Keystone
    participant S as Another service (e.g. Nova)
    N->>K: name + password, for a project
    K-->>N: token + service catalog
    N->>S: request + token (to the endpoint from the catalog)
    S->>K: is this token valid? (cached)
    K-->>S: yes: user, project, roles
    S-->>N: answer, if the policy allows it

See it for real

openstack token issue
openstack catalog list

The first shows the token you got and the project it is scoped to; the second lists the services and their endpoints.

The lantern: a regular flame lights the register and several of the offices.

Next: Neri has a way in. In which scope will Neri's resources live? 4. Neri's file →

To remember

Lumo: if you keep only 3 things from this page, keep these.

  • Keystone authenticates users and issues tokens; every request to a service carries one.
  • A role says what a user may do, always in a scope: a project or a domain.
  • The service catalog lists the endpoints where each service answers. Keystone neither builds resources nor routes requests.

Check yourself

Lumo: 2 quick questions to check the main ideas of this page. Choose an answer to see the explanation and the section that gives the evidence. Your score counts your first choices and stays in this browser only.

1. What does the service catalog give a client?
Show the answer

Answer: The URLs (endpoints) where each service's API answers. Clients read the catalog to know where to send each request; they then call the service directly with their token. Read the section.

2. A user has a valid token. Can they do anything they want in the cloud?
Show the answer

Answer: No: what is allowed depends on their roles in the token's scope and on each service's policy. The token proves identity and scope; the role in that scope and the policy of each service decide what is allowed. Read the section.