spring-cloud-vault | Configuration Integration with HashiCorp Vault | Identity Management library

 by   spring-cloud Java Version: v4.0.0 License: Apache-2.0

kandi X-RAY | spring-cloud-vault Summary

kandi X-RAY | spring-cloud-vault Summary

spring-cloud-vault is a Java library typically used in Security, Identity Management applications. spring-cloud-vault has no bugs, it has no vulnerabilities, it has build file available, it has a Permissive License and it has low support. You can download it from GitHub, Maven.

Specifically for Spring applications:.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              spring-cloud-vault has a low active ecosystem.
              It has 263 star(s) with 142 fork(s). There are 34 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 29 open issues and 447 have been closed. On average issues are closed in 50 days. There are 1 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of spring-cloud-vault is v4.0.0

            kandi-Quality Quality

              spring-cloud-vault has 0 bugs and 0 code smells.

            kandi-Security Security

              spring-cloud-vault has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              spring-cloud-vault code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              spring-cloud-vault is licensed under the Apache-2.0 License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              spring-cloud-vault releases are available to install and integrate.
              Deployable package is available in Maven.
              Build file is available. You can build the component from source.
              Installation instructions, examples and code snippets are available.

            Top functions reviewed by kandi - BETA

            kandi has reviewed spring-cloud-vault and discovered the below as its top functions. This is intended to give you an instant insight into spring-cloud-vault implemented functionality, and help decide if they suit your requirements.
            • Create a new property source locator
            • Builds a list of context names from the given application name and profiles
            • Returns a collection of SecretBackendMetadata for the given vault
            • Gets the property source configuration
            • Creates a new VaultEndpoint object
            • Creates a vault endpoint from the given service instance
            • Loads a vault configuration
            • Register a reactive infrastructure
            • Fetch all the secrets from the vault
            • Create secrets object
            • Retrieves the Google credential from GCPI properties
            • Transforms the input properties
            • The vault end point
            • Retrieves the Google credential from the GCPI properties
            • Create a new VaultTemplate instance
            • Creates a hash code for this instance
            • Sets the composite property source
            • Deserialize an error from a WebClientResponseException
            • Returns whether or not the given values are equal
            • Resolves the vault specific configuration
            • Sets the application name
            • Retrieve the vault instance
            • Gets the vault instance
            • Creates a spring - managed vault endpoint
            • Returns a string representation of this class
            • Return the variables for this credential
            Get all kandi verified functions for this library.

            spring-cloud-vault Key Features

            No Key Features are available at this moment for spring-cloud-vault.

            spring-cloud-vault Examples and Code Snippets

            No Code Snippets are available at this moment for spring-cloud-vault.

            Community Discussions

            QUESTION

            How to allow spring boot applications to use custom jar having spring cloud dependency
            Asked 2021-Apr-05 at 11:24

            I have many spring boot microservices and I have developed a new project that has Spring-Vault as a dependency. This new project (say vault-client-spring) is developed in order to have common configuration for setting up of Vault and use it in all of the microservices and I have published the jar in private maven hosted repository in my organization.

            My problem is when I add this jar as dependency in any microservices, the application is not starting throwing the following error. The Spring-Cloud-Vault dependencies are not imported to my consuming projects. I've also added the necessary properties requrired starting with prefix spring.cloud.vault in bootstrap.yml file.

            Here's my build.gradle file for vault-client-spring.

            ...

            ANSWER

            Answered 2021-Apr-05 at 11:24

            I found it myself. Since I'm developing as "library", I have to allow Spring-Vault dependencies to get included in consuming applications. As per Gradle's java-library plugin, I used api dependency. The consuming applications can able to access and bootstrap them.

            Source https://stackoverflow.com/questions/66860267

            QUESTION

            bootstrap.yml configuration not processed anymore with Spring Cloud 2020.0
            Asked 2020-Dec-25 at 04:28

            In my Spring Boot project, I defined 4 profiles

            1. demo
            2. dev
            3. test
            4. prod

            properties in YAML files will be replaced by HashiCorp Vault properties during startup. For this, I use Spring Cloud Vault library. Everything works as expected in Spring Boot 2.3.x

            When I try to upgrade the project to Spring Boot 2.4.0 with Spring Cloud Vault 3.0.0-SNAPSHOT version, the properties are not being replaced

            bootstrap.yml

            ...

            ANSWER

            Answered 2020-Nov-30 at 18:57

            As pointed put by Nicoll, With Spring Cloud Vault 3.0 and Spring Boot 2.4, the bootstrap context initialization (bootstrap.yml, bootstrap.properties) of property sources was deprecated. This can be fixed in one of the 2 ways

            1. Use Spring Boot 2.4.0 Config Data API to import configuration from Vault
            2. Enable the bootstrap context either by setting the configuration property spring.cloud.bootstrap.enabled=true or by including the dependency org.springframework.cloud:spring-cloud-starter-bootstrap

            1. Use Spring Boot 2.4.0 Config Data API

            Move bootstrap.yml configuration to application.yml and define spring.config.import to import all profiles. And it looks like below

            Source https://stackoverflow.com/questions/64994034

            QUESTION

            Gradle could not resolve org.springframework.vault:spring-vault-core
            Asked 2020-Aug-24 at 20:54

            I have a project that adopts Spring Vault to fetch credential. Dependencies of the project are as following and build.gradle file is generated automatically afterwards.

            When I build the project I got the error

            Could not resolve org.springframework.vault:spring-vault-core:2.2.2.RELEASE.

            Possible solution:

            I have checked the libraries by going to the Project Structures and got the weird thing

            The weird thing I mean here is about the path of the jar file. It should be something like

            %GRADLE_HOME%\caches\modules-2\files-2.1\org.springframework.cloud\spring-cloud-vault-config\2.2.3.RELEASE\5fd5a06deb01db77eb3e9b8e723ccc1e0790c420

            How can I fix this issue in IntelliJ?

            ...

            ANSWER

            Answered 2020-Aug-24 at 20:54

            When you get an error about could not resolve dependencies in gradle, then there are several things you need to check.

            1. Proxy settings (should be inside gradle.properties)
            2. Permission for creating directories (particularly in %GRADLE_HOME%\caches\modules-2\files-2.1)

            For the problem of proxy setting, simply set values for the following fields inside gradle.properties

            Source https://stackoverflow.com/questions/63362498

            QUESTION

            How can I use SpringBoot to pick up DB credentials from Vault?
            Asked 2020-Jul-07 at 22:06

            I have a springboot app that uses these versions:

            ...

            ANSWER

            Answered 2020-Jul-06 at 23:02

            You are missing the annotations on DatabaseConfig.java

            Which will be something like this.

            Source https://stackoverflow.com/questions/62763769

            QUESTION

            How to fix "Vault location [kv/my-client-service] not resolvable: Not found" when I am trying to connect HashiCorp Vault using AWS IAM role?
            Asked 2020-Jun-29 at 05:30

            I have been using HashiCorp Vault for six months now where my all the secrets from the configuration service. I was connecting all my client services using spring.cloud.config.token but the problem came when the vault token expires every 30 days or so. For lower environment, token expiry is acceptable as we can redeploy again and again but PRODUCTION, we cannot redeploy. Hence, it was decided that using AWS IAM role, one can connect to vault and there wont be any expiration.

            I have followed this official link but I am facing the below issue when I am starting the application.

            I have googled about it but didn't get a working solution.

            I am using the below code in bootstrap.yml file in my client service (my-client-service)

            bootstrap.yml

            ...

            ANSWER

            Answered 2020-Jun-26 at 13:01

            I fixed this issue after updating my vault policy with the below configuration:

            Source https://stackoverflow.com/questions/62449421

            QUESTION

            ${VAULT_SCHEME} not working in bootstrap.properties
            Asked 2020-May-02 at 11:06

            I have configured spring boot application to take properties from my environment but strangely I am facing an error while starting my application. I have added the properties in my ~/.bash_profile and also did source ~/.bash_profile after adding them to the profile.

            This is how my bootstrap.properties look like:

            ...

            ANSWER

            Answered 2020-May-02 at 10:56

            The root cause of the problem can be found form this error message:

            Source https://stackoverflow.com/questions/61550802

            QUESTION

            403 Permission Denied when trying to read Secrets from Vault using GCP IAM auth
            Asked 2020-Jan-28 at 10:45

            I am using GCP IAM auth method to authenticate against vault. I followed the steps as suggested in vault gcp authto authenticate using a Service Account

            I was able to successfully authenticate and login. But when I try to read the secrets from the specified path, it says permission denied.

            ...

            ANSWER

            Answered 2020-Jan-28 at 10:45

            It was the policy setting. I updated it to below and it worked! Specific path instead of *.

            Source https://stackoverflow.com/questions/59944930

            QUESTION

            spring-cloud-vault: min-renewal vs. expiry-threshold
            Asked 2020-Jan-08 at 18:02

            The spring-cloud-vault Lease lifecycle management (renewal and revocation) documentation states that:

            spring.cloud.vault.config.lifecycle.min-renewal: sets the duration that is at least required before renewing a lease. This setting prevents renewals from happening too often.

            spring.cloud.vault.config.lifecycle.expiry-threshold: sets the expiry theshold. A lease is renewed the configured period of time before it expires.

            I'm having a hard time understanding the difference between these two configuration options. It would be helpful to be given an example of how each of these parameters affects the lease renewal lifecycle. For example: it seems pretty clear to me that if the lease TTL is 10 minutes, and if the expiry-threshold is set to 1 minute, then 9 minutes after the lease is acquired spring-cloud-vault would renew the lease. But if that it true what is the purpose for the min-renewal configuration parameter?

            ...

            ANSWER

            Answered 2020-Jan-08 at 18:02

            The expiry threshold controls the renewal time at which the lease is renewed.

            For example: it seems pretty clear to me that if the lease TTL is 10 minutes, and if the expiry-threshold is set to 1 minute, then 9 minutes after the lease is acquired spring-cloud-vault would renew the lease.

            Your understanding is correct.

            What's about min-renewal?

            When the remaining validity time of your lease is less than 1 minute (say 30 seconds), then the calculated renewal time would be 30 seconds in the past (or now, as we cannot schedule things to happen in the past). min-renewal helps to debounce renewal requests. This is because, in such a scenario, refresh happens immediately.

            Once renewed, SecretLeaseContainer schedules a subsequent renewal that reports a lease validity of slightly less than 30 seconds. We don't want to create a loop that hammers your Vault server with renewal requests if the remaining lease duration is less than expiry-threshold.

            Example:

            • expiry-threshold: 60 seconds
            • min-renewal: 10 seconds

            The following list of events shows with a time correlation what happens at which time assuming the TTL is final and cannot be extended:

            • 10:00:00 Lease obtained. TTL 10 minutes (600 seconds). Schedule lease renewal in 9 minutes (10 minutes TTL - 1 minute expiry threshold -> 9 minutes)
            • 10:09:00 Lease renewed. Remaining TTL 1 minute (60 seconds). Schedule lease renewal in 10 seconds (1 minute TTL - 1 minute expiry threshold -> 0 minutes. Fall back to 10 seconds min-renewal as that is the larger value -> 10 seconds).
            • 10:09:10 Lease renewed. Remaining TTL 50 seconds. Schedule lease renewal in 10 seconds (50 seconds TTL - 1 minute expiry threshold -> -10 seconds. Fall back to 10 seconds min-renewal as that is the larger value -> 10 seconds).
            • (continue until reaching 10 seconds)
            • 10:09:50 Lease renewed. Remaining TTL less than 10 seconds. Min-renewal is greater than the remaining TTL and the lease is considered expired.

            Example where expiry threshold is greater than min-renewal:

            • expiry-threshold: 5 minutes (180 seconds)
            • min-renewal: 6 minutes (360 seconds)

            The following list of events shows with a time correlation what happens at which time assuming the TTL is final and cannot be extended:

            • 10:00:00 Lease obtained. TTL 10 minutes (600 seconds). Schedule lease renewal in 6 minutes (10 minutes TTL - 5 minute expiry threshold -> 5 minutes. Min-renewal is set to 6 minutes to issue a renewal at most once in 6 minutes -> 6 minutes)

            • 10:06:00 Lease obtained. TTL 4 minutes (360 seconds). Schedule lease renewal in 6 minutes (4 minutes TTL - 5 minute expiry threshold -> -1 minutes. 6 minutes min-renewal as that is the is greater than the remaining TTL so the lease is considered expired)

            Source https://stackoverflow.com/questions/59649836

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install spring-cloud-vault

            To get started with Vault and this guide you need a *NIX-like operating systems that provides:.
            wget, openssl and unzip
            at least Java 8 and a properly configured JAVA_HOME environment variable
            Root CA
            Vault Certificate (decrypted key work/ca/private/localhost.decrypted.key.pem and certificate work/ca/certs/localhost.cert.pem)
            Spring Cloud Vault Config requires SSL certificates and a running Vault instance listening on localhost:8200. Certificates and the Vault setup are scripted, the scripts are located in src/test/bash. The following scripts need to be run prior to building the project for the tests to pass. Leave Vault uninitialized, the tests will initialize and unseal Vault. They will also create a root token 00000000-0000-0000-0000-000000000000. Changes to the documentation should be made to the adocs found under docs/src/main/asciidoc/. README.adoc can be re-generated via the following. This script requires ruby and the asciidoctor gem installed (gem install asciidoctor).
            In order to setup Intellij you should import our coding conventions, inspection profiles and set up the checkstyle plugin. The following files can be found in the Spring Cloud Build project. Go to File → Settings → Editor → Code style. There click on the icon next to the Scheme section. There, click on the Import Scheme value and pick the Intellij IDEA code style XML option. Import the spring-cloud-build-tools/src/main/resources/intellij/Intellij_Spring_Boot_Java_Conventions.xml file. Go to File → Settings → Editor → Inspections. There click on the icon next to the Profile section. There, click on the Import Profile and import the spring-cloud-build-tools/src/main/resources/intellij/Intellij_Project_Defaults.xml file. To have Intellij work with Checkstyle, you have to install the Checkstyle plugin. It’s advisable to also install the Assertions2Assertj to automatically convert the JUnit assertions.
            Default Checkstyle rules
            File header setup
            Default suppression rules
            Project defaults for Intellij that apply most of Checkstyle rules
            Project style conventions for Intellij that apply most of Checkstyle rules
            checkstyle.header.file - please point it to the Spring Cloud Build’s, spring-cloud-build-tools/src/main/resources/checkstyle-header.txt file either in your cloned repo or via the https://raw.githubusercontent.com/spring-cloud/spring-cloud-build/master/spring-cloud-build-tools/src/main/resources/checkstyle-header.txt URL.
            checkstyle.suppressions.file - default suppressions. Please point it to the Spring Cloud Build’s, spring-cloud-build-tools/src/checkstyle/checkstyle-suppressions.xml file either in your cloned repo or via the https://raw.githubusercontent.com/spring-cloud/spring-cloud-build/master/spring-cloud-build-tools/src/checkstyle/checkstyle-suppressions.xml URL.
            checkstyle.additional.suppressions.file - this variable corresponds to suppressions in your local project. E.g. you’re working on spring-cloud-contract. Then point to the project-root/src/checkstyle/checkstyle-suppressions.xml folder. Example for spring-cloud-contract would be: /home/username/spring-cloud-contract/src/checkstyle/checkstyle-suppressions.xml.

            Support

            The spring-cloud-build module has a "docs" profile, and if you switch that on it will try to build asciidoc sources from src/main/asciidoc. As part of that process it will look for a README.adoc and process it by loading all the includes, but not parsing or rendering it, just copying it to ${main.basedir} (defaults to ${basedir}, i.e. the root of the project). If there are any changes in the README it will then show up after a Maven build as a modified file in the correct place. Just commit it and push the change.
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/spring-cloud/spring-cloud-vault.git

          • CLI

            gh repo clone spring-cloud/spring-cloud-vault

          • sshUrl

            git@github.com:spring-cloud/spring-cloud-vault.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Explore Related Topics

            Consider Popular Identity Management Libraries

            vault

            by hashicorp

            k9s

            by derailed

            keepassxc

            by keepassxreboot

            keycloak

            by keycloak

            uuid

            by uuidjs

            Try Top Libraries by spring-cloud

            spring-cloud-netflix

            by spring-cloudJava

            spring-cloud-gateway

            by spring-cloudJava

            spring-cloud-kubernetes

            by spring-cloudJava

            spring-cloud-config

            by spring-cloudJava

            spring-cloud-sleuth

            by spring-cloudJava