Coder Social home page Coder Social logo

ansible-role-vault's Issues

The service fails when vault_local_binary_location and vault binary is not vault

If you apply the role with vault_local_binary_location: /home/test/download/vault_oss, then the servies will not start.

The role installs the binary retaining the local filename, but the rest of the settings still expect the binary to be named vault.

dest: '{{ vault_install_directory }}/{{ vault_local_binary_location | basename }}'

should probably be changed to

    dest: '{{ vault_install_directory }}/vault'

Fix command to create Vault instances

The command to create instances returns with an error as the gcloud syntax might have changed. --scopes flag is the problem and I found that this works instead:

for i in 0 1; do
  gcloud compute instances create vault-${i} \
    --async \
    --no-address \
    --boot-disk-size 100GB \
    --image-family ubuntu-1804-lts \
    --image-project ubuntu-os-cloud \
    --machine-type n1-standard-1 \
    --scopes=https://www.googleapis.com/auth/cloudkms \
    --scopes=compute-ro \
    --tags vault
done

Add conditional for ProtectSystem params in systemd unit

If Vault's home and data directories below /usr the systemd unit file cannot include these two parameters.

# Sandboxing settings to improve the security of the host by restricting vault privileges and access
ProtectSystem=true
ProtectSystem=full

Explanation:

Takes a boolean argument or the special values "full" or "strict". If true, mounts the /usr/ and the boot loader directories (/boot and /efi) read-only for processes invoked by this unit. If set to "full", the /etc/ directory is mounted read-only, too. If set to "strict" the entire file system hierarchy is mounted read-only, except for the API file system subtrees /dev/, /proc/ and /sys/ (protect these directories using PrivateDevices=, ProtectKernelTunables=, ProtectControlGroups=). This setting ensures that any modification of the vendor-supplied operating system (and optionally its configuration, and local mounts) is prohibited for the service. It is recommended to enable this setting for all long-running services, unless they are involved with system updates or need to modify the operating system in other ways. If this option is used, ReadWritePaths= may be used to exclude specific directories from being made read-only. This setting is implied if DynamicUser= is set. This setting cannot ensure protection in all cases. In general it has the same limitations as ReadOnlyPaths=, see below. Defaults to off.

ref: https://www.freedesktop.org/software/systemd/man/systemd.exec.html

Launching the Vault service results in an error message claiming it is a read-only filesystem when using the above two parameters.

tls_disable_client_certs missing from listener tcp stanza

Suggest to add conditional on new Boolean var (maybe vault_tls_disable_client_certs) for tls_disable_client_certs.
Currently not present at all, which makes Vault request client certificates from everyone. This is likely in most use-cases not required and can be problematic for LB health checks against Vault when the LB doesn't send Vault a proper cert.

tls_disable_client_certs = "false"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.