Skip to content
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

Audit and server log the unseal and generate-root operations #2244

Closed
vishalnayak opened this issue Jan 9, 2017 · 10 comments
Closed

Audit and server log the unseal and generate-root operations #2244

vishalnayak opened this issue Jan 9, 2017 · 10 comments

Comments

@vishalnayak
Copy link
Member

No description provided.

@vishalnayak vishalnayak self-assigned this Jan 9, 2017
@vishalnayak vishalnayak added this to the 0.6.5 milestone Jan 9, 2017
@vishalnayak vishalnayak changed the title Audit the unseal operation Audit the unseal and generate-root operations Jan 9, 2017
@vishalnayak vishalnayak changed the title Audit the unseal and generate-root operations Audit and server log the unseal and generate-root operations Jan 9, 2017
@vishalnayak vishalnayak modified the milestones: 0.7.0, 0.6.5 Jan 26, 2017
@jefferai jefferai modified the milestones: 0.7.0, 0.7.1 Mar 1, 2017
@jefferai jefferai modified the milestones: 0.7.1, 0.7.2 May 1, 2017
@tburt11
Copy link

tburt11 commented May 9, 2017

I am concerned that the decode command line is stored in the bash history and in some cases, logged for audit purposes.

This command:
vault generate-root -otp R1gnhIAvatKSWHI6Tm4Lag== -decode hHlUpNFqm9UCLl1DVCV4XA==
is stored in bash history and re-executing this command produces the identical new root token again and again.

Am I missing something?

@jefferai
Copy link
Member

jefferai commented May 9, 2017

Depending on your shell configuration it could be. You can:

  1. Turn history off
  2. Source the value from a file into stdin and pipe it in
  3. Delete your history
  4. Write and/or use use a different XOR function that doesn't operate on CLI arguments
  5. Ensure that you have revoked the root token as soon as you are done using it

You have lots of options!

@jefferai jefferai modified the milestones: 0.7.3, 0.7.4 Jun 8, 2017
@jefferai jefferai modified the milestones: 0.7.4, near-term Jul 24, 2017
@rtlong
Copy link

rtlong commented Aug 10, 2018

I just came across this and I'm very surprised it's missing from the audit log. This seems like an operation one definitely wants to see in an audit log.

I notice there's no activity on this in over a year. Could anyone provide an update on the status of this effort?

@metalivedev
Copy link

Even though the keys are not associated with vault users, they could be associated with GPG keys if they were used during keying. Could the log indicate which keys were used based on the GPG key they were originally encrypted-with?

@kiwivogel
Copy link

@rtlong I'd guess this is mainly due to the fact that only an active node writes audits and that an unsealed node by definition is inactive. But I agree that a standby node should either forward these operations to the active node for auditing or buffer it and then audit it when it becomes active itself.

@rfc1036
Copy link

rfc1036 commented Mar 30, 2020

Also seal operators are not correctly logged: the audit log will contain a request object but not the corresponding response object. Unseal requests are not logged at all.

This is very disappointing for me, because I have been trying to make root access to the server conditional on Vault being sealed.

@ncabatoff
Copy link
Collaborator

Also seal operators are not correctly logged: the audit log will contain a request object but not the corresponding response object.

This is unfortunate but not surprising: once Vault is sealed just about everything internal shuts down, making it difficult to ensure that the response gets written.

Unseal requests are not logged at all.

generate-root operations are now audit logged, as of 1.3. This is the first exception to the general rule that only authenticated and login endpoints are audit logged. In principle we could extend this to audit log unseal requests, but I'm less persuaded of the benefit of auditing unseal requests. Note that we won't be able to record failed unseal attempts, since the audit device configuration is kept behind the sealed barrier.

This is very disappointing for me, because I have been trying to make root access to the server conditional on Vault being sealed.

I don't understand this goal. When Vault is sealed, no vault-token using operations can succeed, only unseal requests - and those use unseal keys, not root tokens.

@rfc1036
Copy link

rfc1036 commented Mar 30, 2020

I mean OS-level root access to the server, not using Vault root tokens. The goal is to make harder for the local system administrator to tamper with Vault, e.g. with ptrace.

@ncabatoff
Copy link
Collaborator

generate-root operations are now audit logged, as of 1.3

My mistake, as of 1.4 (#8301).

@vishalnayak
Copy link
Member Author

Issues that are not reproducible and/or not had any interaction for a long time are stale issues. Sometimes even the valid issues remain stale lacking traction either by the maintainers or the community. In order to provide faster responses and better engagement with the community, we strive to keep the issue tracker clean and the issue count low. In this regard, our current policy is to close stale issues after 30 days. Closed issues will still be indexed and available for future viewers. If users feel that the issue is still relevant but is wrongly closed, we encourage reopening them.

Please refer to our contributing guidelines for details on issue lifecycle.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

10 participants