Users, teams and access
Everything so far was done by the one administrator, who can do anything. This chapter makes the second account — the one that can do almost nothing — and proves, by signing in as it, exactly how little it holds. It is the chapter that turns chapter 1's rule from a warning into a working arrangement.
Check: transcript
portainer-lab/transcripts/t07-users-and-teams.txt
ends with the new account signed in
successfully, asking for the
environment list, and being shown
[]. Nothing. That empty list is the
most reassuring output in this guide.
The two grades of user
Portainer has two built-in grades:
- Administrator (the API's
Role: 1). Every environment, every action, the console's own settings, other users. Chapter 1's rule, with a login screen. - Standard user (
Role: 2). Sees exactly the environments they have been granted, and within them does ordinary container work. Cannot see the console's settings, cannot mint administrators, cannot even suspect the environments they were not given — the lab's reader was not told "access denied" aboutlocal; as far as that login can tell,localdoes not exist.
(The Business Edition refines this further — read-only and helpdesk grades, sign-on through a company directory. The two-grade model here is CE's, and it is enough for most houses.)
Teams
A team is a named group —
storytellers, in the lab — that
access can be granted to as a body.
Membership has its own small ladder:
a team leader may manage the
team's membership; a member is
simply in. Grant the team, and each
person's access follows their
membership and not a spreadsheet
somewhere. The lab made the team,
made reader (a standard user), and
joined the two in three calls
(transcript t07).
Access is per environment
The grant itself — the switch that
empties or fills that [] — is made
on the environment: Environments →
the environment → Manage access,
where users and teams are given the
environment, one by one or body by
body. Deliberately, the lab stopped
before flipping it: a new account
starts with nothing, membership
alone grants nothing, and an
administrator must say, environment
by environment, this one, yes.
There is no "share everything" switch
to bump into by accident, which is
precisely the design a privileged
door (chapter 1) should have.
Two adjacent mechanisms complete the
picture, both visible in the lab's
own data. Resource controls ride
on individual things — the stack
created in chapter 6 came back marked
AdministratorsOnly in its record
(transcript t04), meaning even a user
granted the environment would not
touch that stack until an
administrator widened its control.
And authentication beyond the
built-in database — LDAP and OAuth
sign-on — exists in the settings and
is described, not run, in this guide:
for a house console, the internal
accounts are the honest scope.
The habit to keep
Make the second account even if you live alone with the console. Do your daily looking through it, and keep the administrator for administering. Every day the powerless account suffices is a day a stolen session, a careless script, or a curious guest finds an empty list instead of the keys to every engine you own.