Skip to content

More information about securely setting up a sensitive configuration via the CLI #147

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions help/configuration/cli/set-configuration-values.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,19 +118,19 @@ bin/magento config:set [--scope="..."] [--scope-code="..."] [-le | --lock-env] [
**To set sensitive configuration values**:

```bash
bin/magento config:sensitive:set [--scope="..."] [--scope-code="..."] path value
bin/magento config:sensitive:set [--scope="..."] [--scope-code="..."] path
```

The following table describes the `set` command parameters:

| Parameter | Description |
| --- | --- |
| `--scope` | The scope of the configuration. The possible values are `default`, `website`, or `store`. The default is `default`. |
| `--scope-code` | The scope code of configuration (website code or store view code) |
| `-e or --lock-env` | Either locks the value so it cannot be edited in the Admin or changes a setting that is already locked in the Admin. The command writes the value to the `<Commerce base dir>/app/etc/env.php` file. |
| `-c or --lock-config` | Either locks the value so it cannot be edited in the Admin or changes a setting that is already locked in the Admin. The command writes the value to the `<Commerce base dir>/app/etc/config.php` file. The `--lock-config` option overwrites `--lock-env` if you specify both options. |
| `path` | _Required_. The configuration path |
| `value` | _Required_. The value of the configuration |
| Parameter | Description |
| --- |----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `--scope` | The scope of the configuration. The possible values are `default`, `website`, or `store`. The default is `default`. |
| `--scope-code` | The scope code of configuration (website code or store view code) |
| `-e or --lock-env` | Either locks the value so it cannot be edited in the Admin or changes a setting that is already locked in the Admin. The command writes the value to the `<Commerce base dir>/app/etc/env.php` file. |
| `-c or --lock-config` | Either locks the value so it cannot be edited in the Admin or changes a setting that is already locked in the Admin. The command writes the value to the `<Commerce base dir>/app/etc/config.php` file. The `--lock-config` option overwrites `--lock-env` if you specify both options. |
| `path` | _Required_. The configuration path |
| `value` | _Required_. The value of the configuration. Can be passed as a separate argument in a CLI command, but it is recommended to enter it via prompt ( without specifying it in the original command ). In this case you will avoid writing sensitive accesses to bash_history, which is the safest way to set the config |

>[!INFO]
>
Expand Down