You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: AUTHENTICATION.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ This document describes how you can configure authentication for the STACKIT CLI
5
5
## Service account
6
6
7
7
You can use a [service account](https://docs.stackit.cloud/stackit/en/service-accounts-134415819.html) to authenticate to the STACKIT CLI.
8
-
The CLI will search for service account credentials similarly to the [STACKIT SDK](https://github.com/stackitcloud/stackit-sdk-go) and [Terraform Provider](https://github.com/stackitcloud/terraform-provider-stackit), so if you have setup you environment previously for those tools, you can just run:
8
+
The CLI will search for service account credentials similarly to the [STACKIT SDK](https://github.com/stackitcloud/stackit-sdk-go) and [STACKIT Terraform Provider](https://github.com/stackitcloud/terraform-provider-stackit), so if you have already set up your environment for those tools, you can just run:
9
9
10
10
```bash
11
11
$ stackit auth activate-service-account
@@ -15,7 +15,7 @@ You can also configure the service account credentials directly in the CLI. To g
15
15
16
16
### Overview
17
17
18
-
If you dont have a service account, create one in the STACKIT Portal an assign it the necessary permissions, e.g. `owner`. There are two ways to authenticate:
18
+
If you don't have a service account, create one in the [STACKIT Portal](https://portal.stackit.cloud/) and assign the necessary permissions to it, e.g. `owner`. There are two ways to authenticate:
19
19
20
20
- Key flow (recommended)
21
21
- Token flow
@@ -39,20 +39,20 @@ When setting up authentication, the CLI will always try to use the key flow firs
39
39
40
40
### Key flow
41
41
42
-
The following instructions assume that you have created a service account and assigned it the necessary permissions, e.g. `owner`.
42
+
The following instructions assume that you have created a service account and assigned the necessary permissions to it, e.g. `owner`.
43
43
44
44
To use the key flow, you need to have a service account key, which must have an RSA key-pair attached to it.
45
45
46
46
When creating the service account key, a new RSA key-pair can be created automatically, which will be included in the service account key. This will make it much easier to configure the key flow authentication in the CLI, by just providing the service account key.
47
47
48
-
**Optionally**, you can provide your own private key when creating the service account key, which will then require you to also provide it explicitly to the CLI, additionaly to the service account key. Check the STACKIT Knowledge Base for an [example of how to create your own key-pair](https://docs.stackit.cloud/stackit/en/usage-of-the-service-account-keys-in-stackit-175112464.html#UsageoftheserviceaccountkeysinSTACKIT-CreatinganRSAkey-pair).
48
+
**Optionally**, you can provide your own private key when creating the service account key, which will then require you to also provide it explicitly to the CLI, additionally to the service account key. Check the STACKIT Knowledge Base for an [example of how to create your own key-pair](https://docs.stackit.cloud/stackit/en/usage-of-the-service-account-keys-in-stackit-175112464.html#UsageoftheserviceaccountkeysinSTACKIT-CreatinganRSAkey-pair).
49
49
50
50
To configure the key flow, follow this steps:
51
51
52
52
1. Create a service account key:
53
53
54
54
- In the CLI, run `stackit service-account key create --email <SERVICE_ACCOUNT_EMAIL>`
55
-
- As an alternative, use the STACKIT Portal: go to the `Service Accounts` tab, choose a `Service Account` and go to `Service Account Keys` to create a key. For more details, see [Create a service account key](https://docs.stackit.cloud/stackit/en/create-a-service-account-key-175112456.html)
55
+
- As an alternative, use the [STACKIT Portal](https://portal.stackit.cloud/): go to the `Service Accounts` tab, choose a `Service Account` and go to `Service Account Keys` to create a key. For more details, see [Create a service account key](https://docs.stackit.cloud/stackit/en/create-a-service-account-key-175112456.html)
56
56
57
57
2. Save the content of the service account key by copying it and saving it in a JSON file.
Copy file name to clipboardExpand all lines: CONTRIBUTION.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -38,16 +38,16 @@ The CLI commands are located under `internal/cmd`, where each folder includes th
38
38
39
39
### Implementing a new command
40
40
41
-
Let's suppose you want to want to implement a new command `bar`, that would be the direct child of an existing command `stackit foo` (meaning it would be invoked as `stackit foo bar`):
41
+
Let's suppose you want to implement a new command `bar`, that would be the direct child of an existing command `stackit foo` (meaning it would be invoked as `stackit foo bar`):
42
42
43
43
1. You would start by creating a new folder `bar/` inside `internal/cmd/foo/`
44
44
2. Following with the creation of a file `bar.go` inside your new folder `internal/cmd/foo/bar/`
45
45
1. The Go package should be similar to the command usage, in this case `package bar` would be an adequate name
46
-
2. Please refer to the [Command file structure](./CONTRIBUTION.md/#command-file-structure) section for details on the strcutre of the file itself
46
+
2. Please refer to the [Command file structure](./CONTRIBUTION.md/#command-file-structure) section for details on the structure of the file itself
47
47
3. To register the command `bar` as a child of the existing command `foo`, add `cmd.AddCommand(bar.NewCmd(p))` to the `addSubcommands` method of the constructor of the `foo` command
48
48
1. In this case, `p` is the `printer` that is passed from the root command to all subcommands of the tree (refer to the [Outputs, prints and debug logs](./CONTRIBUTION.md/#outputs-prints-and-debug-logs) section for more details regarding the `printer`)
49
49
50
-
Please remeber to run `make generate-docs` after your changes to keep the commands' documentation updated.
50
+
Please remember to run `make generate-docs` after your changes to keep the commands' documentation updated.
51
51
52
52
#### Command file structure
53
53
@@ -212,7 +212,7 @@ If you want to add a command that uses a STACKIT service `foo` that was not yet
212
212
213
213
1. Add a `FooCustomEndpointKey` key in `internal/pkg/config/config.go` (and add it to `ConfigKeys` and set the to default to `""` using `viper.SetDefault`)
214
214
2. Update the `stackit config unset` and `stackit config unset` commands by adding flags to set and unset a custom endpoint for the `foo` service API, respectively, and update their unit tests
215
-
3.Setup the SDK client configuration, using the authentication method configured in the CLI
215
+
3.Set up the SDK client configuration, using the authentication method configured in the CLI
216
216
217
217
1. This is done in `internal/pkg/services/foo/client/client.go`
218
218
2. Below is an example of a typical `client.go` file structure:
@@ -291,6 +291,6 @@ If you would like to report a bug, please open a [GitHub issue](https://github.c
291
291
To ensure we can provide the best support to your issue, follow these guidelines:
292
292
293
293
1. Go through the existing issues to check if your issue has already been reported.
294
-
2. Make sure you are using the latest version of the provider, we will not provide bug fixes for older versions. Also, latest versions may have the fix for your bug.
295
-
3. Please provide as much information as you can about your environment, e.g. your version of Go, your version of the provider, which operating system you are using and the corresponding version.
294
+
2. Make sure you are using the latest version of the STACKIT CLI, we will not provide bug fixes for older versions. Also, latest versions may have the fix for your bug.
295
+
3. Please provide as much information as you can about your environment, e.g. your version of Go, your version of the CLI, which operating system you are using and the corresponding version.
296
296
4. Include in your issue the steps to reproduce it, along with code snippets and/or information about your specific use case. This will make the support process much easier and efficient.
Some commands are implemented at the root, group or sub-group level:
36
+
Some commands are implemented at the root, group or subgroup level:
37
37
38
38
-`stackit config` to define variables to be used in future commands.
39
39
-`stackit ske enable` to enable the SKE engine on your project.
@@ -71,9 +71,9 @@ Below you can find a list of the STACKIT services already available in the CLI (
71
71
72
72
## Authentication
73
73
74
-
Most of the commands will require you to be authenticated. Currently it's possible to authenticate with your personal user or with a service account.
74
+
Most of the commands will require you to be authenticated. Currently, it's possible to authenticate with your personal user or with a service account.
75
75
76
-
After successful authentication, the CLI stores credentials in your OS keychain. You won't need to login again for the duration of your session, which is 2h by default but configurable by providing the `--session-time-limit` flag on the `config set` command (see [Configuration](#configuration)).
76
+
After successful authentication, the CLI stores credentials in your OS keychain. You won't need to log in again for the duration of your session, which is 2h by default but configurable by providing the `--session-time-limit` flag on the `config set` command (see [Configuration](#configuration)).
77
77
78
78
### Login with a personal user account
79
79
@@ -91,7 +91,7 @@ To authenticate using a service account, run:
91
91
stackit auth activate-service-account
92
92
```
93
93
94
-
For more details on how to setup authentication using a service account, check our [authentication guide](./AUTHENTICATION.md).
94
+
For more details on how to set up authentication using a service account, check our [authentication guide](./AUTHENTICATION.md).
95
95
96
96
## Configuration
97
97
@@ -119,9 +119,9 @@ To remove it, you can run:
119
119
stackit config unset --project-id
120
120
```
121
121
122
-
Run the `config set` command with the flag `--help` to get a list of all of the available configuration options.
122
+
Run the `config set` command with the flag `--help` to get a list of all the available configuration options.
123
123
124
-
You can lookup your current configuration by checking the configuration file or by running:
124
+
You can look up your current configuration by checking the configuration file or by running:
125
125
126
126
```bash
127
127
stackit config list
@@ -131,11 +131,11 @@ You can also edit the configuration file manually.
131
131
132
132
## Autocompletion
133
133
134
-
If you wish to setup command autocompletion in your shell for the STACKIT CLI, please refer to our [autocompletion guide](./AUTOCOMPLETION.md).
134
+
If you wish to set up command autocompletion in your shell for the STACKIT CLI, please refer to our [autocompletion guide](./AUTOCOMPLETION.md).
135
135
136
136
## Reporting issues
137
137
138
-
If you encounter any issues or have suggestions for improvements, please reach out to the Developer Tools team or open a ticket through the [STACKIT Help Center](https://support.stackit.cloud/).
138
+
If you encounter any issues or have suggestions for improvements, please open an issue in the [repository](https://github.com/stackitcloud/stackit-cli/issues).
139
139
140
140
## Contribute
141
141
@@ -144,3 +144,13 @@ Your contribution is welcome! For more details on how to contribute, refer to ou
0 commit comments