Brian Nuszkowski
5bc4dc7540
Add the option to specify a specific key id format that is generated … ( #2888 )
2017-06-29 04:05:06 +01:00
Jeff Mitchell
f6155ea8c5
If recovering from panic ensure the cert returned is nil
2017-06-16 18:18:15 -04:00
Jeff Mitchell
0ee100e0ec
Go's SSH library can panic without warning; recover.
...
Ping #2877 -- but don't close yet in case there are more places.
2017-06-16 18:16:45 -04:00
Vishal Nayak
5d9277b2fb
Added host key call back for ssh config ( #2752 )
2017-05-21 20:16:13 -04:00
Jeff Mitchell
eb0e7cd0d2
Don't write salts in initialization, look up on demand ( #2702 )
2017-05-09 17:51:09 -04:00
Jeff Mitchell
2fbd973001
Add logic to skip initialization in some cases and some invalidation logic
2017-05-05 15:01:52 -04:00
Jeff Mitchell
866b384494
Parse and dedup but do not lowercase principals in SSH certs. ( #2591 )
2017-04-18 12:21:02 -04:00
Jeff Mitchell
14c0000169
Update SSH CA documentation
...
Fixes #2551
Fixes #2569
2017-04-07 11:59:25 -04:00
Vishal Nayak
16d41a8b28
sshca: ensure atleast cert type is allowed ( #2508 )
2017-03-19 18:58:48 -04:00
Jeff Mitchell
a5d1808efe
Always include a hash of the public key and "vault" (to know where it ( #2498 )
...
came from) when generating a cert for SSH.
Follow on from #2494
2017-03-16 11:14:17 -04:00
Mike Okner
6f84f7ffd0
Adding allow_user_key_ids field to SSH role config ( #2494 )
...
Adding a boolean field that determines whether users will be allowed to
set the ID of the signed SSH key or whether it will always be the token
display name. Preventing users from changing the ID and always using
the token name is useful for auditing who actually used a key to access
a remote host since sshd logs key IDs.
2017-03-16 08:45:11 -04:00
Stanislav Grozev
70b30b40d4
Reads on unconfigured SSH CA public key return 400
2017-03-14 10:21:48 -04:00
Stanislav Grozev
5f3397bff5
Reads on ssh/config/ca return the public keys
...
If configured/generated.
2017-03-14 10:21:48 -04:00
Stanislav Grozev
d22796c644
If generating an SSH CA signing key - return the public part
...
So that the user can actually use the SSH CA, by adding the public key
to their respective sshd_config/authorized_keys, etc.
2017-03-14 10:21:48 -04:00
Vishal Nayak
9af1ca3d2c
doc: ssh allowed_users update ( #2462 )
...
* doc: ssh allowed_users update
* added some more context in default_user field
2017-03-09 10:34:55 -05:00
vishalnayak
3bd667a931
Fix typo
2017-03-08 17:49:39 -05:00
Vishal Nayak
a4e41f6568
SSH CA enhancements ( #2442 )
...
* Use constants for storage paths
* Upgrade path for public key storage
* Fix calculateValidPrincipals, upgrade ca_private_key, and other changes
* Remove a print statement
* Added tests for upgrade case
* Make exporting consistent in creation bundle
* unexporting and constants
* Move keys into a struct instead of plain string
* minor changes
2017-03-08 17:36:21 -05:00
Jeff Mitchell
df575f0b3a
Rename helper 'duration' to 'parseutil'. ( #2449 )
...
Add a ParseBool function that accepts various kinds of ways of
specifying booleans.
Have config use ParseBool for UI and disabling mlock/cache.
2017-03-07 11:21:22 -05:00
Vishal Nayak
8491db3ce6
ssh: Added DeleteOperation to config/ca ( #2434 )
...
* ssh: Added DeleteOperation to config/ca
* Address review feedback
2017-03-03 10:19:45 -05:00
Jeff Mitchell
5fe459f91a
Update SSH CA logic/tests
2017-03-02 16:39:22 -05:00
Vishal Nayak
93b74ebe71
Refactor the generate_signing_key processing ( #2430 )
2017-03-02 16:22:06 -05:00
Jeff Mitchell
1c821e448d
Update error text to make it more obvious what the issue is when valid principals aren't found
2017-03-02 15:56:08 -05:00
Jeff Mitchell
db29bde264
Fix a bunch of errors from returning 5xx, and parse more duration types
2017-03-02 15:38:34 -05:00
Will May
ffb5ee7fda
Changes from code review
2017-03-02 14:36:13 -05:00
Will May
f9d853f7f0
Allow internal generation of the signing SSH key pair
2017-03-02 14:36:13 -05:00
Vishal Nayak
d30a833db7
Rework ssh ca ( #2419 )
...
* docs: input format for default_critical_options and default_extensions
* s/sshca/ssh
* Added default_critical_options and default_extensions to the read endpoint of role
* Change default time return value to 0
2017-03-01 15:50:23 -05:00
Will May
7d9cb5bffe
Changes from code review
...
Major changes are:
* Remove duplicate code
* Check the public key used to configure the backend is a valid one
2017-03-01 15:19:18 -05:00
Will May
59397250da
Changes from code review
...
Major changes are:
* Change `allow_{user,host}_certificates` to default to false
* Add separate `allowed_domains` role property
2017-03-01 15:19:18 -05:00
Will May
1d59b965cb
Add ability to create SSH certificates
2017-03-01 15:19:18 -05:00
Jeff Mitchell
8acbdefdf2
More porting from rep ( #2388 )
...
* More porting from rep
* Address review feedback
2017-02-16 16:29:30 -05:00
vascop
59c55e0aa6
Fix typo and remove trailing whitespace. ( #2074 )
2016-11-08 09:32:23 -05:00
vishalnayak
b408c95e0d
ssh: Use temporary file to store the identity file
2016-10-18 12:50:12 -04:00
vishalnayak
fb2f7f27ba
Fix ssh tests
2016-09-22 11:37:55 -04:00
vishalnayak
c93bded97b
Added cidrutil helper
2016-09-21 13:58:32 -04:00
Jeff Mitchell
c2f3c465d3
Decode secret internal data into struct and fix type assertion. ( #1781 )
2016-08-24 15:04:04 -04:00
Jeff Mitchell
68345eb770
Convert to logxi
2016-08-21 18:13:37 -04:00
Jeff Mitchell
357ecb4dfe
gofmt
2016-08-19 16:48:32 -04:00
vishalnayak
b632ef58e4
Add allowed_roles to ssh-helper-config and return role name from verify call
2016-07-05 11:14:29 -04:00
Jeff Mitchell
551f4a8606
Change AWS/SSH to reuse backend creation code for test functions
2016-06-01 12:17:47 -04:00
Jeff Mitchell
74a1e3bd61
Remove most Root paths
2016-05-31 23:42:54 +00:00
vishalnayak
8ae663f498
Allow * to be set for allowed_users
2016-05-30 03:12:43 -04:00
vishalnayak
c945b8b3f2
Do not allow any username to login if allowed_users is not set
2016-05-30 03:01:47 -04:00
Sean Chittenden
339c0a4127
Speling police
2016-05-15 09:58:36 -07:00
Jeff Mitchell
77a2afa922
Merge pull request #1291 from mmickan/ssh-keyinstall-perms
...
Ensure authorized_keys file is readable when uninstalling an ssh key
2016-04-25 14:00:37 -04:00
vishalnayak
ac5ceae0bd
Added AcceptanceTest boolean to logical.TestCase
2016-04-05 15:10:44 -04:00
Mark Mickan
8deed677d2
Ensure authorized_keys file is readable when uninstalling an ssh key
...
Without this change, if the user running the ssh key install script doesn't
have read access to the authorized_keys file when uninstalling a key, all
keys will be deleted from the authorized_keys file.
Fixes GH #1285
2016-04-05 17:26:21 +09:30
vishalnayak
9280dda5f4
rename verify_cert as disable_binding and invert the logic
2016-02-24 21:01:21 -05:00
vishalnayak
f5f9a9a056
ssh: Fix response code for ssh/verify
2016-02-16 19:46:29 -05:00
vishalnayak
6b5b96d795
Fix SSH test cases.
2016-02-02 12:32:50 -05:00
Jeff Mitchell
2eb08d3bde
Make backends much more consistent:
...
1) Use the new LeaseExtend
2) Use default values controlled by mount tuning/system defaults instead
of a random hard coded value
3) Remove grace periods
2016-01-29 20:03:37 -05:00
Jeff Mitchell
886f641e5d
Add listing of roles to ssh backend
2016-01-28 12:48:00 -05:00
Chi Vinh Le
555834f83d
Cleanly close SSH connections
2016-01-19 07:59:08 +01:00
Jeff Mitchell
21f91f73bb
Update deps, and adjust usage of go-uuid to match new return values
2016-01-13 13:40:08 -05:00
Jeff Mitchell
45e32756ea
WriteOperation -> UpdateOperation
2016-01-08 13:03:03 -05:00
Jeff Mitchell
a0308e6858
Migrate 'uuid' to 'go-uuid' to better fit HC naming convention
2015-12-16 12:56:20 -05:00
Jeff Mitchell
0ea4271ddb
Use split-out hashicorp/uuid
2015-10-12 14:07:12 -04:00
Jeff Mitchell
5088eb322c
Remove use of os/user as it cannot be run with CGO disabled
2015-10-02 18:43:38 -07:00
Jeff Mitchell
fa53293b7b
Enhance SSH backend documentation; remove getting of stored keys and have TTLs honor backends systemview values
2015-09-21 16:14:30 -04:00
Jeff Mitchell
a4ca14cfbc
Add HMAC capability to salt. Pass a salt into audit backends. Require it for audit.Hash.
2015-09-18 17:38:22 -04:00
Jeff Mitchell
11cea42ec7
Rename View to StorageView to make it more distinct from SystemView
2015-09-15 13:50:37 -04:00
vishalnayak
484d854de0
Vault SSH: Testing credential creation on zero address roles
2015-09-10 11:55:07 -04:00
vishalnayak
32fc41cbac
Vault SSH: Expected data for testRoleRead
2015-09-10 10:44:26 -04:00
vishalnayak
005e996784
Vault SSH: Refactoring tests
2015-09-03 18:56:45 -04:00
vishalnayak
b978db0aba
Vault SSH: Refactor lookup test case
2015-09-03 18:43:53 -04:00
vishalnayak
543f659c8e
Vault SSH: Testcase restructuring
2015-09-03 18:11:04 -04:00
vishalnayak
4748b97061
Vault SSH: make Zeroaddress entry Remove method private
2015-08-31 17:10:55 -04:00
vishalnayak
22ff8fc8ad
Vault SSH: Store roles as slice of strings
2015-08-31 17:03:46 -04:00
vishalnayak
f67a12266e
Vault SSH: refactoring
2015-08-31 16:03:28 -04:00
vishalnayak
0a4e27a1d5
Vault SSH: Refactoring backend_test
2015-08-30 14:30:59 -04:00
vishalnayak
f72befc9c6
Vault SSH: ZeroAddress CRUD test
2015-08-30 14:20:16 -04:00
vishalnayak
afdbc043e7
Vault SSH: Add read method for zeroaddress endpoint
2015-08-29 20:22:34 -04:00
vishalnayak
79be357030
Vault SSH: Zeroaddress roles and CIDR overlap check
2015-08-29 15:24:15 -04:00
vishalnayak
1226251d14
Vault SSH: Added exclude_cidr_list option to role
2015-08-27 23:19:55 -04:00
vishalnayak
06ac073684
Vault SSH: Docs for default CIDR value
2015-08-27 13:10:15 -04:00
vishalnayak
140013aebd
Vault SSH: Default CIDR for roles
2015-08-27 13:04:15 -04:00
vishalnayak
630f348dbf
Vault SSH: Provide key option specifications for dynamic keys
2015-08-27 11:41:29 -04:00
vishalnayak
91ce8b31ab
Vault SSH: Create .ssh directory if not present. Closes #573
2015-08-27 08:45:34 -04:00
vishalnayak
0843c3400b
Vault SSH: Documentation update
2015-08-24 14:18:37 -04:00
vishalnayak
2d5070ba50
Vault SSH: Replace args with named vars
2015-08-24 14:07:07 -04:00
vishalnayak
c33e4d24e1
Merging with master
2015-08-24 13:55:20 -04:00
vishalnayak
00c69bfacb
Vault SSH: Cleanup of aux files in install script
2015-08-24 13:50:46 -04:00
Jeff Mitchell
99041b5b6d
Merge pull request #561 from hashicorp/fix-wild-cards
...
Allow hyphens in endpoint patterns of most backends
2015-08-21 11:40:42 -07:00
vishalnayak
923fe4125c
Vault SSH: Undo changes which does not belong to wild card changes
2015-08-21 09:58:15 -07:00
vishalnayak
41678f18ae
Vault: Fix wild card paths for all backends
2015-08-21 00:56:13 -07:00
Jeff Mitchell
97112665e8
Internally refactor Lease/LeaseGracePeriod into TTL/GracePeriod
2015-08-20 18:00:51 -07:00
vishalnayak
acb883c4b8
Vault SSH: Make the script readable
2015-08-20 16:12:17 -07:00
vishalnayak
de30c66fea
Vault SSH: Removing script file
2015-08-19 12:59:52 -07:00
vishalnayak
36bf873a47
Vault SSH: 1024 is default key size and removed 4096
2015-08-19 12:51:33 -07:00
vishalnayak
d6c5031169
Vault SSH: TLS client creation test
2015-08-18 19:00:27 -07:00
vishalnayak
99736663e2
Vault SSH: verify echo test
2015-08-18 16:48:50 -07:00
vishalnayak
a4437a0371
Vault SSH: Fix backend test cases
2015-08-18 15:40:52 -07:00
vishalnayak
d63726b41b
Vault SSH: Documentation update and minor refactoring changes.
2015-08-17 18:22:03 -07:00
vishalnayak
a98b3befd9
Vault SSH: Website page for SSH backend
2015-08-14 12:41:26 -07:00
vishalnayak
52d4c0be9c
Vault SSH: Install script is optional now. Default script will be for Linux host.
2015-08-13 17:07:43 -07:00
vishalnayak
ffaf80167d
Vault SSH: CLI embellishments
2015-08-13 16:55:47 -07:00
vishalnayak
3958136a78
Vault SSH: Introduced allowed_users option. Added helpers getKey and getOTP
2015-08-13 14:18:30 -07:00
vishalnayak
9b1ea2f20c
Vault SSH: Helper for OTP creation and role read
2015-08-13 11:12:30 -07:00
vishalnayak
3d77058773
Vault SSH: Mandate default_user. Other refactoring
2015-08-13 10:36:31 -07:00
vishalnayak
2dd82aeb9a
Vault SSH: cidr to cidr_list
2015-08-13 08:46:55 -07:00
vishalnayak
1a1ce742dd
Vault SSH: Default lease duration, policy/ to role/
2015-08-12 17:36:27 -07:00
vishalnayak
d1b75e9d28
Vault SSH: Default lease of 5 min for SSH secrets
2015-08-12 17:10:35 -07:00
vishalnayak
f74a0c9bfa
Vault SSH: Exposed verify request/response messges to agent
2015-08-12 13:22:48 -07:00
vishalnayak
67b705565e
Vault SSH: Added SSHAgent API
2015-08-12 10:48:58 -07:00
vishalnayak
18db544d26
Vault SSH: Website doc v1. Removed path_echo
2015-08-12 09:25:28 -07:00
vishalnayak
044a2257e7
Vault SSH: Automate OTP typing if sshpass is installed
2015-08-06 17:00:50 -04:00
vishalnayak
0542fd8389
Vault SSH: uninstall dynamic keys using script
2015-08-06 15:50:12 -04:00
vishalnayak
c26782acad
Vault SSH: Script to install dynamic keys in target
2015-08-06 14:48:19 -04:00
vishalnayak
607732261b
Vault SSH: Added 'echo' path to SSH
2015-08-04 15:30:24 -04:00
vishalnayak
f50193efe1
Vault SSH: Testing OTP creation
2015-08-03 19:04:07 -04:00
vishalnayak
552853d995
Vault SSH: CRUD tests for named keys
2015-08-03 16:18:14 -04:00
vishalnayak
2b76d37f14
Vault SSH: CRUD test for lookup API
2015-08-03 11:22:00 -04:00
vishalnayak
e9826c635c
Vault SSH: CRUD test for dynamic role
2015-07-31 15:17:40 -04:00
vishalnayak
8dbbb8b8e6
Vault SSH: CRUD test case for OTP Role
2015-07-31 13:24:23 -04:00
vishalnayak
9aa02ad560
Vault SSH: Review Rework
2015-07-29 14:21:36 -04:00
Vishal Nayak
11a6c6de12
Vault SSH: Refactoring
2015-07-27 16:42:03 -04:00
Vishal Nayak
6a91529f4e
Vault SSH: admin_user/default_user fix
2015-07-27 15:03:10 -04:00
Vishal Nayak
6c5548ca7b
Vault SSH: Refactoring
2015-07-27 13:02:31 -04:00
Vishal Nayak
0a4854e542
Vault SSH: Dynamic Key test case fix
2015-07-24 12:13:26 -04:00
Vishal Nayak
9d4c5f718b
Vault SSH: keys/ designated special path
2015-07-23 18:12:13 -04:00
Vishal Nayak
3a1eaf1869
Vault SSH: Support OTP key type from CLI
2015-07-23 17:20:28 -04:00
Vishal Nayak
795d1a8d40
Vault SSH: Added vault server otp verify API
2015-07-22 16:00:58 -04:00
Vishal Nayak
ef05fe4051
Vault SSH: Vault agent support
2015-07-22 14:15:19 -04:00
Vishal Nayak
47a9f548fe
Vault SSH: Refactoring and fixes
2015-07-10 18:44:31 -06:00
Vishal Nayak
eb0f119491
Vault SSH: Backend and CLI testing
2015-07-10 16:18:02 -06:00
Vishal Nayak
c25525a22a
Vault SSH: Test case skeleton
2015-07-10 09:56:14 -06:00
Vishal Nayak
6f86d32089
Vault SSH: Made port number configurable
2015-07-06 16:56:45 -04:00
Vishal Nayak
280efd28f6
Vault SSH: PR review rework: Formatting/Refactoring
2015-07-02 19:52:47 -04:00
Vishal Nayak
fbaea45101
Vault SSH: PR review rework
2015-07-02 17:23:09 -04:00
Vishal Nayak
2ebd10cdf4
Vault SSH: review rework: formatted and moved code
2015-07-01 21:26:42 -04:00
Vishal Nayak
e6e243b4ca
Vault SSH: Regex supports hypen in key name and role names
2015-07-01 21:05:52 -04:00
Vishal Nayak
57174693ce
Vault SSH: replaced concatenated strings by fmt.Sprintf
2015-07-01 20:35:11 -04:00
Vishal Nayak
13ab7fc40b
Vault SSH: PR review rework - 1
2015-07-01 11:58:49 -04:00
Vishal Nayak
af03222a3e
For SSH backend, allow factory to be provided instead of Backend
2015-07-01 09:37:11 -04:00
Vishal Nayak
d258b1819a
lease handling fix
2015-06-30 20:21:41 -04:00
Vishal Nayak
2163818bd6
Input validations, help strings, default_user support
2015-06-30 18:33:17 -04:00
Vishal Nayak
756be6976d
Refactoring changes
2015-06-29 22:00:08 -04:00
Vishal Nayak
208e068138
SCP in pure GO and CIDR parsing fix
2015-06-29 11:49:34 -04:00
Vishal Nayak
5da639feff
Creating SSH keys and removal of files in pure 'go'
2015-06-26 15:43:27 -04:00
Vishal Nayak
7dbad8386c
ssh/lookup implementation and refactoring
2015-06-25 21:47:32 -04:00
Vishal Nayak
4b07eba487
POC: Rework. Doing away with policy file.
2015-06-24 18:13:12 -04:00
Vishal Nayak
9d709bd5a9
SSHs to multiple users by registering the respective host keys
2015-06-19 12:59:36 -04:00
Vishal Nayak
fe5bb20e92
Roles, key renewal handled. End-to-end basic flow working.
2015-06-18 20:48:41 -04:00
Vishal Nayak
f2ace92e98
Implementation for storing and deleting the host information in Vault
2015-06-17 22:10:47 -04:00
Vishal Nayak
fa83fe89f0
Received OTK in SSH client. Forked SSH process from CLI. Added utility file for SSH.
2015-06-17 20:33:03 -04:00
Vishal Nayak
fb866f9059
Added: Ssh CLI command and API, config lease impl, sshConnect path to backend, http handler for Ssh connect
2015-06-17 12:39:49 -04:00
Vishal Nayak
647f3a59d9
Vault SSH: POC Stage 1. Skeleton implementation.
2015-06-16 16:58:54 -04:00