Open EvanMAmstutz opened 4 years ago
Hmm, I don't think this is possible. The output above suggests statically linked files don't exist. This was probably compiled with CGO, which means the binary depends on glibc to work. The Vault container uses Alpine, which uses musl instead of glibc.
@jasonodonnell thanks for the response. The way I see it there are a few ways forward from here with the dynamic secrets for Oracle: 1) Run Vault on VMs as opposed to containers. 2) Pull the Vault container image and build a layer on top which adds the glibc (not even remotely ideal)
Can you see any other paths I could take? I am seeing why the Oracle plugin is the only one listed as "external" to Vault.
@EvanMAmstutz In the near future we're releasing Vault Universal Base Image (UBI) containers. These will have glibc and it should make this possible. I would keep a look out for those! The code has already been merged if you're interested in building and trying: https://github.com/hashicorp/docker-vault/tree/master/ubi but keep in mind that we haven't officially released these so support is limited.
@jasonodonnell great thanks. I will try that out!
@jasonodonnell I am now getting the following error
vault write --tls-skip-verify database/config/my-oracle-database plugin_name=oracle-database-plugin connection_url="{{username}}/{{password}}@//host:1521/<db>" allowed_roles="*" username="VAULT_SUPER_
USR" password="VAULTSUPERUSR"
Error writing data to database/config/my-oracle-database: Error making API request.
URL: PUT https://host/v1/database/config/my-oracle-database
Code: 400. Errors:
* error creating database object: Unrecognized remote plugin message:
This usually means that the plugin is either invalid or simply
needs to be recompiled to support the latest protocol.
Could this still be with the Oracle Instant Client or is it something else with the how the plugin is configured?
I'm assuming you registered the plugin with the catalog? This doc might help: https://support.hashicorp.com/hc/en-us/articles/360021245994-Enabling-Oracle-Database-Secrets-Engine.
It could still be missing packages:
Follow the InstantClient installation instructions for your version to properly install it, making sure that it has been added to the system library cache and that the libaio/libaio1 dependency package has also been installed.
Just wanted to chime in that a potential problem you might have faced might be related to TLS errors when the plugin tries to unwrap the token it was passed as documented here.
If you check Vault's logs/audit logs, you will see the actual errors. The errors I encountered were:
You need to make sure the api_addr
passed to the Vault server is one of the SAN in Vault's certificate. By default, this chart sets this to the Pod IP Address which might not be covered by your certificate. You will have to override server.ha.apiAddr
to something else.
You will have to make sure the plugin can actually find the CA that issued the certificate. You can point the plugin to the correct path for the CA using the "usual" VAULT_CACERT
environment variable during your plugin registration by setting the env
parameter.
I am trying to install the Oracle Client via init containers so I can use the Oracle database plugin. Without it I get the following
The extraInitContainers in my values.yaml looks like this
After downloading the client and installing it in /opt/oracle, I get the following errors when trying to access all of the libraries needed for the Oracle plugin
Is there a way to use init containers to install the Oracle client and have it be usable by the Oracle plugin?