IDAPI_ADMIN_TOKEN
This is the password for the admin user.
IDAPI_USE_SA
If set, this tells idapi that it should authenticate using a
ServiceAccount.
IDAPI_AUTH_DB
Path to authentication information. This points to a directory that contains one file per user, where the content of each file is the password for that user.
This is meant to configured via Kubernetes secrets.
POST /user
Create a new user. Payload is JSON dictionary of the form:
{
"user": "username",
"full_name": "Full Name"
}
Returns information about the created user, or 409 CONFLICT if the
user already exists.
GET /user/<user>
Return information about <user>, or a 404 error if the user does not exist.
DELETE /user/<user>
Remove user and any associated identities.
POST /project
Create a new project. Payload is JSON dictionary of the form:
{
"project": "projectname",
"requester": "username",
"display_name": "Display Name"
}
Returns information about the created project, or 409 CONFLICT if the
project already exists.
GET /project/<project>
Return information about <project>, or a 404 error if the project does not exist.
DELETE /project/<project>
Remove project.
POST /project/<project>/role
Create a new rolebinding in <project>. Payload is a JSON dictionary of
the form:
{
"role": "rolename"
}
The role key may have the value admin, edit, or view. This will
create a rolebinding in <project> named moc-<role> that maps
associated users to the cluster role <role>.
GET /project/<project>/role/<role>
DELETE /project/<project>/role/<role>
POST /project/<project>/role/<role>
DELETE /project/<project>/role/<role>/user/<user>
The following examples use the http command from httpie.
http --auth admin:secret https://idapi/user [email protected]
http --auth admin:secret https://idapi/project project=lars-example
http --auth admin:secret https://idapi/project/lars-example/role/admin \
[email protected]
http --auth admin:secret DELETE https://idapi/project/lars-example/role/admin/user/[email protected]
Content type
Image
Digest
Size
30.4 MB
Last updated
about 6 years ago
docker pull larsks/idapi:20200910-3