Create and manage credentials
Prerequisites
Section titled “Prerequisites”- You have created a MariaDB instance.
Check Create and manage instances for MariaDB.
List, create, view and delete service keys
Section titled “List, create, view and delete service keys”This article describes how to handle credentials for your MariaDB instance. A service key is the only available form of credential that you can create for now. With a service key, you can fully authenticate yourself against your instance.
List service keys
Section titled “List service keys”To get a list of all service keys for a MariaDB instance:
| Flag | Description |
|---|---|
| instance-id | Instance ID of the instance you want to query |
stackit mariadb credentials list --instance-id <instance-id>You get something like the following output:
ID──────────────────────────────────────ccaf719c-b954-4190-93c9-6b9ccb55c530In this case ccaf719c-b954-4190-93c9-6b9ccb55c530 is the service key ID.
- Open your project in the STACKIT Portal.
- Navigate to Databases > MariaDB.
- Choose your instance and go to the overview.
- In the sidebar, select Credentials.
Now you can see the list of service keys for your instance. Click on an entry in the list to see the details.
-
To use the Cloud Foundry CLI you first need to login into your STACKIT project endpoint. Read Interact with Cloud Foundry to get help logging in.
-
Create the service key with the
cfcommand:Terminal window cf create-service-key [service-name] [service-key] -
List the service key with the
cfcommand:Terminal window cf service-key [service-name] [service-key]
Create a new service key
Section titled “Create a new service key”To create a service key for a MariaDB instance:
| Flag | Description | Default | Optional |
|---|---|---|---|
| instance-id | Instance ID of the instance you want to query | ||
| show-password | Username of the new user | x |
stackit mariadb credentials create --instance-id <instance-id>You get the following output:
Created credentials for instance "my-mariadb-instance". Credentials ID: a0dc53d2-e6fe-49ed-aac3-5bb5f374ecc2
Username: a9s32142d4c4993ce4c2c928285e007Password: <hidden>Host: mad30dc70-1.data.eu01.onstackit.cloudPort: 49271URI: mysql://a9s32142d4c4993ce4c2c928285e007:a9s69c596f707f28fddcef2f5eb4326c58d47bbc3f9@mad30dc70-1.data.eu01.onstackit.cloud:49271/mad30dc70- Open your project in the STACKIT Portal.
- Navigate to Databases > MariaDB.
- Choose your instance and go to the overview.
- In the sidebar, select Credentials.
- In the top bar, click on Create credentials.
- Wait for the popup dialog to appear and copy all information to a safe place.
View a service key
Section titled “View a service key”To get details of a service key for a MariaDB instance:
| Flag | Description | Default | Optional |
|---|---|---|---|
| instance-id | Instance ID of the instance you want to query | ||
| service-key-id | The ID of the service key |
stackit mariadb credentials describe <service-key-id> --instance-id <instance-id>Use List service keys to get the service-key-id for the requested service key.
You get an output which is similiar to the following:
ID │ ccaf719c-b954-4190-93c9-6b9ccb55c530──────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────USERNAME │ a9s87adfa95ea09124e3034355524d2──────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────PASSWORD │ a9sec3e313c1038a9316c63ac19d83133167bb07aec──────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────URI │ mysql://a9s87adfa95ea09124e3034355524d2:a9sec3e313c1038a9316c63ac19d83133167bb07aec@mad30dc70-1.data.eu01.onstackit.cloud:49271/mad30dc70-
Open your project in the STACKIT Portal.
-
Navigate to Databases > MariaDB.
-
Choose your instance and go to the overview.
-
In the sidebar, select Credentials.
-
Click on the service key entry you want to view.
Delete a service key
Section titled “Delete a service key”To delete a service key for a MariaDB instance:
| Flag | Description | Default | Optional |
|---|---|---|---|
| instance-id | Instance ID of the instance you want to query | ||
| service-key-id | The ID of the service key |
stackit mariadb credentials delete <service-key-id> --instance-id <instance-id>After confirmation, you get the following output:
Deleted credentials a9s87adfa95ea09124e3034355524d2 of instance "my-mariadb-instance"- Open your project in the STACKIT Portal.
- Navigate to Databases > MariaDB.
- Choose your instance and go to the overview.
- In the sidebar, select Credentials.
- Click on the three dots on the right side of a user entry.
- Click on Delete.
-
To use the Cloud Foundry CLI you first need to login into your STACKIT project endpoint. Read Interact with Cloud Foundry to get help logging in.
-
Delete the service key with the
cfcommand:Terminal window cf delete-service-key [service-name] [service-key]