How to create an API key with specific permissions?

I would like to create an API key which will give read-only access.

No such thing at this time; it’s all or nothing. I believe there are plans to change this in future releases, but it isn’t there now.

In FangTooth (25.04) you will be able to create API keys for particular truenas user accounts that inherit whatever privileges are associated with the user account.

This means for readonly API access you would:

  1. create service account (locked-down local user account)
  2. grant service account relevant read-only API privileges
  3. create API key for service account

Enterprise customers will be able to do (2) → (3) for existing AD / LDAP service accounts that should access the NAS.

1 Like