Skip to content

Commit

Permalink
Resolved conflicts
Browse files Browse the repository at this point in the history
Signed-off-by: Aashir Siddiqui <[email protected]>
  • Loading branch information
aashir21 committed Nov 4, 2024
2 parents e9c2eda + 5265b63 commit f4f2533
Show file tree
Hide file tree
Showing 34 changed files with 4,560 additions and 51 deletions.
137 changes: 137 additions & 0 deletions .secrets.baseline
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,16 @@
}
],
"results": {
"dockerfiles/certs/ibminter.pem": [
{
"hashed_secret": "b3723414cb4a90ac8c2bc504ea01923fe5fccc8a",
"is_secret": false,
"is_verified": false,
"line_number": 28,
"type": "Artifactory Credentials",
"verified_result": null
}
],
"gherkin-docs.md": [
{
"hashed_secret": "c61db10457a740b07845146f2d1b391c133a6ebf",
Expand Down Expand Up @@ -133,6 +143,133 @@
"is_verified": false,
"line_number": 88,
"type": "Hex High Entropy String",
"pkg/secrets/secretsDelete_test.go": [
{
"hashed_secret": "2dfbe3ec00a96d6f711d9a70f78be17f6fd574ca",
"is_secret": false,
"is_verified": false,
"line_number": 83,
"type": "Secret Keyword",
"verified_result": null
}
],
"pkg/secrets/secretsGet_test.go": [
{
"hashed_secret": "11747ed2a3904f82931baf592443772259ea8dc1",
"is_secret": false,
"is_verified": false,
"line_number": 26,
"type": "Secret Keyword",
"verified_result": null
},
{
"hashed_secret": "679d55ddc3c3d0f6ea2d11275a5d084669c98d56",
"is_secret": false,
"is_verified": false,
"line_number": 67,
"type": "Secret Keyword",
"verified_result": null
},
{
"hashed_secret": "3b938c1150a71e71e5f1ffeadbe6475f0f6a2e36",
"is_secret": false,
"is_verified": false,
"line_number": 127,
"type": "Secret Keyword",
"verified_result": null
},
{
"hashed_secret": "2dfbe3ec00a96d6f711d9a70f78be17f6fd574ca",
"is_secret": false,
"is_verified": false,
"line_number": 289,
"type": "Secret Keyword",
"verified_result": null
}
],
"pkg/secrets/secretsSet.go": [
{
"hashed_secret": "28aa91a8e751e5c49714ac040e98812f9110a1fd",
"is_secret": false,
"is_verified": false,
"line_number": 54,
"type": "Secret Keyword",
"verified_result": null
}
],
"pkg/secrets/secretsSet_test.go": [
{
"hashed_secret": "89e7fc0c50091804bfeb26cddefc0e701dd60fab",
"is_secret": false,
"is_verified": false,
"line_number": 316,
"type": "Secret Keyword",
"verified_result": null
},
{
"hashed_secret": "edbd5e119f94badb9f99a67ac6ff4c7a5204ad61",
"is_secret": false,
"is_verified": false,
"line_number": 822,
"type": "Secret Keyword",
"verified_result": null
},
{
"hashed_secret": "ea531d9e3ac1dc2beec9c298fb0026d59e4e2262",
"is_secret": false,
"is_verified": false,
"line_number": 825,
"type": "Secret Keyword",
"verified_result": null
}
],
"pkg/secretsformatter/GalasaSecret.go": [
{
"hashed_secret": "1949c4c92eb313637b3b6f654f5cce42df0dde88",
"is_secret": false,
"is_verified": false,
"line_number": 62,
"type": "Secret Keyword",
"verified_result": null
}
],
"pkg/secretsformatter/summaryFormatter.go": [
{
"hashed_secret": "4d55af37dbbb6a42088d917caa1ca25428ec42c9",
"is_secret": false,
"is_verified": false,
"line_number": 50,
"type": "Secret Keyword",
"verified_result": null
}
],
"pkg/secretsformatter/summaryFormatter_test.go": [
{
"hashed_secret": "11747ed2a3904f82931baf592443772259ea8dc1",
"is_secret": false,
"is_verified": false,
"line_number": 20,
"type": "Secret Keyword",
"verified_result": null
}
],
"pkg/secretsformatter/yamlFormatter.go": [
{
"hashed_secret": "4d55af37dbbb6a42088d917caa1ca25428ec42c9",
"is_secret": false,
"is_verified": false,
"line_number": 34,
"type": "Secret Keyword",
"verified_result": null
}
],
"pkg/secretsformatter/yamlFormatter_test.go": [
{
"hashed_secret": "679d55ddc3c3d0f6ea2d11275a5d084669c98d56",
"is_secret": false,
"is_verified": false,
"line_number": 32,
"type": "Secret Keyword",
"verified_result": null
}
]
Expand Down
93 changes: 93 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -631,8 +631,101 @@ galasactl resources delete -f my_resources.yaml

For a complete list of supported parameters see [here](./docs/generated/galasactl_resources_delete.md).

## secrets get

This command retrieves a list of secrets stored in the Galasa Ecosystem's credentials store. The retrieved secrets can be displayed in different formats, including `summary` and `yaml` formats, based on the value provided by the `--format` flag. If `--format` is not provided, secrets will be displayed in the `summary` format by default.

### Examples

All secrets stored in a Galasa Ecosystem can be retrieved using the following command:

```
galasactl secrets get
```

To get a specific secret named `SYSTEM1`, the `--name` flag can be provided as follows:

```
galasactl secrets get --name SYSTEM1
```

To display a secret in a different format, like YAML, the `--format` flag can be provided:

```
galasactl secrets get --name SYSTEM1 --format yaml
```

For a complete list of supported parameters see [here](./docs/generated/galasactl_secrets_get.md).

## secrets set

This command can be used to create and update secrets in the Galasa Ecosystem. These secrets can then be used in Galasa tests to authenticate with test systems and perform other secure operations. The name of a secret to create or update must be provided using the `--name` flag.

### Examples

The `--username`, `--password`, and `--token` flags can be used in different combinations to create different types of secret.

For example, a UsernamePassword secret can be created by supplying `--username` and `--password`:

```
galasactl secrets set --name SYSTEM1 --username "my-username" --password "my-password"
```

A UsernameToken secret can be created by supplying `--username` and `--token`:

```
galasactl secrets set --name SYSTEM1 --username "my-username" --token "my-token"
```

A Token secret can be created by supplying `--token` on its own:
```
galasactl secrets set --name SYSTEM1 --token "my-token"
```

A Username secret can be created by supplying `--username` on its own:

```
galasactl secrets set --name SYSTEM1 --username "my-username"
```

Base64-encoded credentials can be supplied using the `--base64-username`, `--base64-password`, and `--base64-token` flags.

For example, to create a UsernamePassword secret where both the username and password are base64-encoded:

```
galasactl secrets set --name SYSTEM1 --base64-username "my-base64-username" --base64-password "my-base64-password"
```

It is also possible to mix these flags with their non-encoded variants discussed previously. For example, to create a UsernameToken secret where only the token is base64-encoded:

```
galasactl secrets set --name SYSTEM1 --username "my-base64-username" --base64-token "my-base64-token"
```

Once a secret has been created, you can change the type of the secret by supplying your desired secret type using the `--type` flag. When supplying the `--type` flag, all credentials for the new secret type must be provided. To find out what secret types are supported, run `galasactl secrets set --help`.

For example, to create a UsernamePassword secret and then change it to a Token secret:

```
galasactl secrets set --name SYSTEM1 --username "my-username" --password "my-password"
galasactl secrets set --name SYSTEM1 --token "my-token" --type Token
```

For a complete list of supported parameters see [here](./docs/generated/galasactl_secrets_set.md).

## secrets delete

This command deletes a secret with the given name from the Galasa Ecosystem's credentials store. The name of the secret to be deleted must be provided using the `--name` flag.

### Examples

To delete a secret named `SYSTEM1`, run the following command:

```
galasactl secrets delete --name SYSTEM1
```

For a complete list of supported parameters see [here](./docs/generated/galasactl_secrets_delete.md).

## Reference Material

Expand Down
28 changes: 28 additions & 0 deletions docs/generated/errors-list.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,34 @@ The `galasactl` tool can generate the following errors:
- GAL1164E: An attempt to delete a run named '{}' failed. Unexpected http status code {} received from the server. Error details from the server are not in the json format.
- GAL1165E: '{}' is not supported as a valid login ID. Login ID should not contain spaces.
- GAL1166E: The loginId provided by the --user field cannot be an empty string.
- GAL1167E: An attempt to delete a secret named '{}' failed. Unexpected http status code {} received from the server.
- GAL1168E: An attempt to delete a secret named '{}' failed. Unexpected http status code {} received from the server. Error details from the server could not be read. Cause: {}
- GAL1169E: An attempt to delete a secret named '{}' failed. Unexpected http status code {} received from the server. Error details from the server are not in a valid json format. Cause: '{}'
- GAL1170E: An attempt to delete a secret named '{}' failed. Unexpected http status code {} received from the server. Error details from the server are: '{}'
- GAL1171E: An attempt to delete a secret named '{}' failed. Unexpected http status code {} received from the server. Error details from the server are not in the json format.
- GAL1172E: Invalid secret name provided. The name provided with the --name flag cannot be empty, contain spaces or dots (.), and must only contain characters in the Latin-1 character set.
- GAL1173E: An attempt to delete a secret named '{}' failed. Sending the delete request to the Galasa service failed. Cause is {}
- GAL1174E: An attempt to get a secret named '{}' failed. Unexpected http status code {} received from the server.
- GAL1175E: An attempt to get a secret named '{}' failed. Unexpected http status code {} received from the server. Error details from the server could not be read. Cause: {}
- GAL1176E: An attempt to get a secret named '{}' failed. Unexpected http status code {} received from the server. Error details from the server are not in a valid json format. Cause: '{}'
- GAL1177E: An attempt to get a secret named '{}' failed. Unexpected http status code {} received from the server. Error details from the server are: '{}'
- GAL1178E: An attempt to get a secret named '{}' failed. Unexpected http status code {} received from the server. Error details from the server are not in the json format.
- GAL1179E: An attempt to get a secret named '{}' failed. Sending the get request to the Galasa service failed. Cause is {}
- GAL1180E: Failed to get secrets. Unexpected http status code {} received from the server.
- GAL1181E: Failed to get secrets. Unexpected http status code {} received from the server. Error details from the server could not be read. Cause: {}
- GAL1182E: Failed to get secrets. Unexpected http status code {} received from the server. Error details from the server are not in a valid json format. Cause: '{}'
- GAL1183E: Failed to get secrets. Unexpected http status code {} received from the server. Error details from the server are: '{}'
- GAL1184E: Failed to get secrets. Unexpected http status code {} received from the server. Error details from the server are not in the json format.
- GAL1185E: Failed to get secrets. Sending the get request to the Galasa service failed. Cause is {}
- GAL1186E: Invalid secret type provided. Supported secret types are: {}. Check your provided command parameters and try again.
- GAL1187E: Failed to set a secret named '{}'. Unexpected http status code {} received from the server.
- GAL1188E: Failed to set a secret named '{}'. Unexpected http status code {} received from the server. Error details from the server could not be read. Cause: {}
- GAL1189E: Failed to set a secret named '{}'. Unexpected http status code {} received from the server. Error details from the server are not in a valid json format. Cause: '{}'
- GAL1190E: Failed to set a secret named '{}'. Unexpected http status code {} received from the server. Error details from the server are: '{}'
- GAL1191E: Failed to set a secret named '{}'. Unexpected http status code {} received from the server. Error details from the server are not in the json format.
- GAL1192E: Failed to set a secret named '{}'. Sending the put request to the Galasa service failed. Cause is {}
- GAL1193E: Invalid flag combination provided. --username cannot be provided with --base64-username, --password cannot be provided with --base64-password, and --token cannot be provided with --base64-token. Use the --help flag for more information, or refer to the documentation at https://galasa.dev/docs/reference/cli-commands.
- GAL1194E: Invalid secret description provided. The description provided with the --description flag cannot be an empty string, and must only contain characters in the Latin-1 character set.
- GAL1225E: Failed to open file '{}' cause: {}. Check that this file exists, and that you have read permissions.
- GAL1226E: Internal failure. Contents of gzip could be read, but not decoded. New gzip reader failed: file: {} error: {}
- GAL1227E: Internal failure. Contents of gzip could not be decoded. {} error: {}
Expand Down
1 change: 1 addition & 0 deletions docs/generated/galasactl.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,6 @@ A tool for controlling Galasa resources using the command-line.
* [galasactl properties](galasactl_properties.md) - Manages properties in an ecosystem
* [galasactl resources](galasactl_resources.md) - Manages resources in an ecosystem
* [galasactl runs](galasactl_runs.md) - Manage test runs in the ecosystem
* [galasactl secrets](galasactl_secrets.md) - Manage secrets stored in the Galasa service's credentials store
* [galasactl users](galasactl_users.md) - Manages users in an ecosystem

29 changes: 29 additions & 0 deletions docs/generated/galasactl_secrets.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
## galasactl secrets

Manage secrets stored in the Galasa service's credentials store

### Synopsis

The parent command for operations to manipulate secrets in the Galasa service's credentials store

### Options

```
-b, --bootstrap string Bootstrap URL. Should start with 'http://' or 'file://'. If it starts with neither, it is assumed to be a fully-qualified path. If missing, it defaults to use the 'bootstrap.properties' file in your GALASA_HOME. Example: http://example.com/bootstrap, file:///user/myuserid/.galasa/bootstrap.properties , file://C:/Users/myuserid/.galasa/bootstrap.properties
-h, --help Displays the options for the 'secrets' command.
```

### Options inherited from parent commands

```
--galasahome string Path to a folder where Galasa will read and write files and configuration settings. The default is '${HOME}/.galasa'. This overrides the GALASA_HOME environment variable which may be set instead.
-l, --log string File to which log information will be sent. Any folder referred to must exist. An existing file will be overwritten. Specify "-" to log to stderr. Defaults to not logging.
```

### SEE ALSO

* [galasactl](galasactl.md) - CLI for Galasa
* [galasactl secrets delete](galasactl_secrets_delete.md) - Deletes a secret from the credentials store
* [galasactl secrets get](galasactl_secrets_get.md) - Get secrets from the credentials store
* [galasactl secrets set](galasactl_secrets_set.md) - Creates or updates a secret in the credentials store

31 changes: 31 additions & 0 deletions docs/generated/galasactl_secrets_delete.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
## galasactl secrets delete

Deletes a secret from the credentials store

### Synopsis

Deletes a secret from the credentials store

```
galasactl secrets delete [flags]
```

### Options

```
-h, --help Displays the options for the 'secrets delete' command.
--name string A mandatory flag that identifies the secret to be created or manipulated.
```

### Options inherited from parent commands

```
-b, --bootstrap string Bootstrap URL. Should start with 'http://' or 'file://'. If it starts with neither, it is assumed to be a fully-qualified path. If missing, it defaults to use the 'bootstrap.properties' file in your GALASA_HOME. Example: http://example.com/bootstrap, file:///user/myuserid/.galasa/bootstrap.properties , file://C:/Users/myuserid/.galasa/bootstrap.properties
--galasahome string Path to a folder where Galasa will read and write files and configuration settings. The default is '${HOME}/.galasa'. This overrides the GALASA_HOME environment variable which may be set instead.
-l, --log string File to which log information will be sent. Any folder referred to must exist. An existing file will be overwritten. Specify "-" to log to stderr. Defaults to not logging.
```

### SEE ALSO

* [galasactl secrets](galasactl_secrets.md) - Manage secrets stored in the Galasa service's credentials store

32 changes: 32 additions & 0 deletions docs/generated/galasactl_secrets_get.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
## galasactl secrets get

Get secrets from the credentials store

### Synopsis

Get a list of secrets or a specific secret from the credentials store

```
galasactl secrets get [flags]
```

### Options

```
--format string the output format of the returned secrets. Supported formats are: 'summary', 'yaml'. (default "summary")
-h, --help Displays the options for the 'secrets get' command.
--name string An optional flag that identifies the secret to be retrieved.
```

### Options inherited from parent commands

```
-b, --bootstrap string Bootstrap URL. Should start with 'http://' or 'file://'. If it starts with neither, it is assumed to be a fully-qualified path. If missing, it defaults to use the 'bootstrap.properties' file in your GALASA_HOME. Example: http://example.com/bootstrap, file:///user/myuserid/.galasa/bootstrap.properties , file://C:/Users/myuserid/.galasa/bootstrap.properties
--galasahome string Path to a folder where Galasa will read and write files and configuration settings. The default is '${HOME}/.galasa'. This overrides the GALASA_HOME environment variable which may be set instead.
-l, --log string File to which log information will be sent. Any folder referred to must exist. An existing file will be overwritten. Specify "-" to log to stderr. Defaults to not logging.
```

### SEE ALSO

* [galasactl secrets](galasactl_secrets.md) - Manage secrets stored in the Galasa service's credentials store

Loading

0 comments on commit f4f2533

Please sign in to comment.