Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
小 白蛋
Vault
Commits
ffb5ee7f
Commit
ffb5ee7f
authored
8 years ago
by
Will May
Committed by
Vishal Nayak
8 years ago
Browse files
Options
Download
Email Patches
Plain Diff
Changes from code review
parent
f9d853f7
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
builtin/logical/ssh/backend_test.go
+0
-1
builtin/logical/ssh/backend_test.go
builtin/logical/ssh/path_config_ca.go
+8
-0
builtin/logical/ssh/path_config_ca.go
website/source/docs/secrets/ssh/index.html.md
+1
-1
website/source/docs/secrets/ssh/index.html.md
with
9 additions
and
2 deletions
+9
-2
builtin/logical/ssh/backend_test.go
+
0
-
1
View file @
ffb5ee7f
...
...
@@ -537,7 +537,6 @@ func TestBackend_AbleToAutoGenerateSigningKeys(t *testing.T) {
Operation
:
logical
.
UpdateOperation
,
Path
:
"config/ca"
,
Data
:
map
[
string
]
interface
{}{
"generate_signing_key"
:
true
,
},
},
...
...
This diff is collapsed.
Click to expand it.
builtin/logical/ssh/path_config_ca.go
+
8
-
0
View file @
ffb5ee7f
...
...
@@ -27,6 +27,7 @@ func pathConfigCA(b *backend) *framework.Path {
"generate_signing_key"
:
&
framework
.
FieldSchema
{
Type
:
framework
.
TypeBool
,
Description
:
`Generate SSH key pair internally rather than use the private_key and public_key fields.`
,
Default
:
true
,
},
},
...
...
@@ -104,7 +105,14 @@ func generateSSHKeyPair() (string, string, error) {
func
parseSSHKeyPair
(
data
*
framework
.
FieldData
)
(
string
,
string
,
error
)
{
publicKey
:=
data
.
Get
(
"public_key"
)
.
(
string
)
if
publicKey
==
""
{
return
""
,
""
,
errutil
.
UserError
{
Err
:
`missing public_key`
}
}
privateKey
:=
data
.
Get
(
"private_key"
)
.
(
string
)
if
privateKey
==
""
{
return
""
,
""
,
errutil
.
UserError
{
Err
:
`missing public_key`
}
}
_
,
err
:=
ssh
.
ParsePrivateKey
([]
byte
(
privateKey
))
if
err
!=
nil
{
...
...
This diff is collapsed.
Click to expand it.
website/source/docs/secrets/ssh/index.html.md
+
1
-
1
View file @
ffb5ee7f
...
...
@@ -301,7 +301,7 @@ The first thing to do is to get Vault to generate the key pair that will be used
SSH keys:
```
text
$ vault write ssh/config/ca
generate_signing_key=true
$ vault write
-f
ssh/config/ca
Success! Data written to: ssh/config/ca
```
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help