Skip to content

[feature] enable log dir for audit log - #4

Open
sbeliakou wants to merge 1 commit into
hashicorp:masterfrom
sbeliakou:feature/audit-log-dir
Open

[feature] enable log dir for audit log#4
sbeliakou wants to merge 1 commit into
hashicorp:masterfrom
sbeliakou:feature/audit-log-dir

Conversation

@sbeliakou

@sbeliakou sbeliakou commented Nov 2, 2017

Copy link
Copy Markdown
Contributor

By default, vault_audit.log is being created in /var/log/vault, but this folder doesn't exist.
Current fix is just simply creating this folder by linking to "$path/log"

$ ls -l /var/log/vault
lrwxrwxrwx 1 root root         14 Nov  2 07:28 /var/log/vault -> /opt/vault/log

$ ls -l /var/log/vault/
total 9964
drwxr-xr-x 2 vault vault     4096 Nov  2 07:30 ./
drwxr-xr-x 7 vault vault     4096 Nov  1 15:31 ../
-rw------- 1 vault vault    10713 Nov  2 07:31 vault_audit.log
-rw-r--r-- 1 root  root  10169870 Nov  2 07:32 vault-error.log
-rw-r--r-- 1 root  root      4957 Nov  2 07:30 vault-stdout.log

@mcalhoun

mcalhoun commented Nov 8, 2017

Copy link
Copy Markdown
Contributor

There's definitely some debate on where the logfiles should be stored.

I think a better option would be to set an input param to specify the log location, with the default being it's current sudo mkdir -p "$path/log" location without a symlink. Thoughts?

@mcalhoun mcalhoun added the wip label Nov 8, 2017
@sbeliakou

Copy link
Copy Markdown
Contributor Author

Well, I used to find logs under /var/log/"application"/
On production environment we usually don't have many active applications installed and the most simplest and obvious path for many sysadmins is just /var/log/application. At least, this is the first place where we go if something fails.
In most cases I agree with points shouted over there, but quite often logs location is up to Developer :)

@v6

v6 commented Jun 25, 2018

Copy link
Copy Markdown

// , Does this module have support for sending the audit logs to a Unix socket in stead of a file, as in the following Vault documentation:

https://www.vaultproject.io/docs/audit/socket.html

@hashicorp-cla

Copy link
Copy Markdown

CLA assistant check

Thank you for your submission! We require that all contributors sign our Contributor License Agreement ("CLA") before we can accept the contribution. Read and sign the agreement

Learn more about why HashiCorp requires a CLA and what the CLA includes

Have you signed the CLA already but the status is still pending? Recheck it.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants