Skip to content

Support for custom CA path in _get_custom_ca_certificate_location function #111

@Radical-Egg

Description

@Radical-Egg

Hi,

It would be helpful if the CA cert path could be set to a custom location like /etc/ssl/certs/ca-certificates.crt or /etc/pki/tls/certs/ca-bundle.crt which are common paths for the systems CA cert bundles. Currently the _get_custom_ca_certificate_location function only supports placing CA certs in $SPLUNK_HOME/etc/auth/bitwarden_event_logs_cacerts.pem. I was also unable to find any documentation regarding the placement of CA certs in the event TLS validation is required. If this is something that can be changed, I can submit a PR. Thank you!

Possible solution using an environment variable called BITWARDEN_APP_CACERTS

def _get_custom_ca_certificate_location() -> Optional[str]:
    path = os.environ.get(
        "BITWARDEN_APP_CACERTS",
        os.path.join(
            os.environ.get("SPLUNK_HOME", ""),
            "etc", "auth", "bitwarden_event_logs_cacerts.pem"
        )
    )
    return path if os.path.isfile(path) else None

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions