Commit fd337ed
authored
feat:
* feat: add `elastic config` command group for authoring contexts (#75)
New flag-driven command tree for creating and maintaining the config file
without hand-editing YAML:
elastic config context list/add/edit/remove
elastic config current-context get/set
`edit` supports both `--set key=value` patch mode and an `$EDITOR` round-trip.
Secrets are written to the OS keychain when available (macOS `security`,
Linux `secret-tool`/`pass`, Windows Credential Manager) via a new
`SecretStore` abstraction that shells out to the same tools the existing
read-side resolvers use. The YAML holds a `$(keychain:...)` resolver
expression rather than the raw secret, mirroring the read side. When no
keychain is available (or `--inline-secrets` is passed), values are written
inline and the file is chmod'd to 0600.
`loadConfig` now emits an stderr warning when a loaded config has inline
secrets at looser-than-0600 permissions, pointing at chmod 0600 or the new
`config context edit` migration path.
Skips the config-loading preAction hook for `config` descendants so the
commands tolerate the file being absent (they create it).
* feat: add --save-as / --credentials-file to serverless project create (#154)
`serverless {es,observability,security} projects create` and
`reset-credentials` gain three new flags to keep admin credentials off
stdout -- critical for agent/LLM workflows where captured output persists
into model context and transcripts.
--save-as <name> store returned creds in the OS keychain,
upsert a context bound to the new project's
endpoints, and redact stdout. Next command
runs as `elastic --use-context <name> ...`
with zero manual wiring.
--credentials-file <path> write a standalone 0600 YAML config fragment
at <path> instead of mutating the main config.
--force overwrite an existing context / file.
`reset-credentials --save-as <ctx>` updates the named context's auth in
place -- URLs preserved, only passwords rotate. Without either flag,
behaviour is unchanged.
Reuses the `SecretStore` abstraction from the `elastic config` commands so
a single keychain namespace covers both authored and auto-generated creds.elastic config command group + credential-safe project create (#216)1 parent f10c642 commit fd337ed
12 files changed
Lines changed: 2754 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
70 | 126 | | |
71 | 127 | | |
72 | 128 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
40 | 45 | | |
41 | 46 | | |
42 | 47 | | |
| |||
134 | 139 | | |
135 | 140 | | |
136 | 141 | | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
137 | 148 | | |
138 | | - | |
| 149 | + | |
| 150 | + | |
139 | 151 | | |
140 | | - | |
| 152 | + | |
141 | 153 | | |
142 | 154 | | |
143 | 155 | | |
| |||
0 commit comments