User and Policy Management
By default, all requests to the cluster are rejected. You need to explicitly enable access to buckets and objects for users. UltiHash implements a subset of AWS's IAM calls to enable user management and allows you to assign policies to buckets and users.
User Authentication
Any access to UltiHash cluster is authenticated using AWS Signature Version 4. This requires you to set an access key and a secret key for request authentication.
AWS CLI
Depending on the S3 client the way how you pass these credentials may vary. We will use AWS CLI in the following examples. You can install it using the following commands:
You can configure access to UltiHash cluster in your $HOME/.aws/config
file. We will create a profile uh
to be used with UltiHash:
We can now run aws
commands using the profile parameters:
By adding our credentials to $HOME/.aws.credentials
we can also authenticate ourselfs to the cluster:
Root User Account
During the first deployment UltiHash creates a root user account in the cluster that can be used to implement further user management.
The credentials for the root user are stored as a Kubernetes secret. You can find it out the following way:
Replace the <release-name> and <namespace> with the Helm chart release name and Kubernetes namespace correspondingly.
In order to prevent you from locking yourself out of your cluster, requests issued by the root user are not checked against any policy but executed right away. You should not use this account for anything else than cluster administration.
Managing User Accounts
User Creation and Deletion
To create a new user, use IAM calls:
You can remove users using the delete-user
call:
Access Keys
To create a new access key, use create-access-key
action:
To delete the access key:
Policies
UltiHash implements a subset of the IAM policy framework used in AWS. UltiHash allows assigning policies to buckets and to user accounts.
Policy documents must be crafted according to the AWS policy grammar (see https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_grammar.html)
User Policies
User policies are policies that are assigned to a user. The policies are evaluated only for requests that are issued by that user. They can be used to grant special permissions based on user level.
You can assign policies to each user account using IAM actions:
To add an action to a user account:
To list all assigned actions of a user account:
To remove an action from a user account:
Bucket Policies
Bucket policies are policies assigned to a bucket. They are evaluated for all actions that target that bucket.
To assign a policy to a bucket:
To read policies assigned to a bucket:
To delete a policy from a bucket:
Differences to IAM policy framework
Conditions
UltiHash supports only the following condition operators:
StringEquals
StringNotEquals
StringEqualsIgnoreCase
StringNotEqualsIgnoreCase
StringLike
StringNotLike
NumericEquals
NumericNotEquals
NumericLessThan
NumericLessThanEquals
NumericGreaterThan
NumericGreaterThanEquals
Compare to AWS IAM policy operators here: https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_condition_operators.html
Variables
UltiHash lacks at the moment support for request variables.
Last updated