spring-vault | Provides familiar Spring abstractions for HashiCorp Vault | Identity Management library

 by   spring-projects Java Version: 3.0.2 License: Apache-2.0

kandi X-RAY | spring-vault Summary

kandi X-RAY | spring-vault Summary

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

Spring Vault provides client-side support for accessing, storing and revoking secrets. With HashiCorp’s Vault you have a central place to manage external secret data for applications across all environments. Vault can manage static and dynamic secrets such as application data, username/password for remote applications/resources and provide credentials for external services such as MySQL, PostgreSQL, Apache Cassandra, Consul, AWS and more.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              spring-vault has a highly active ecosystem.
              It has 246 star(s) with 167 fork(s). There are 21 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 12 open issues and 645 have been closed. On average issues are closed in 83 days. There are no pull requests.
              It has a positive sentiment in the developer community.
              The latest version of spring-vault is 3.0.2

            kandi-Quality Quality

              spring-vault has 0 bugs and 0 code smells.

            kandi-Security Security

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

            kandi-License License

              spring-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-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.
              spring-vault saves you 13553 person hours of effort in developing the same functionality from scratch.
              It has 27358 lines of code, 2833 functions and 411 files.
              It has medium code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi has reviewed spring-vault and discovered the below as its top functions. This is intended to give you an instant insight into spring-vault implemented functionality, and help decide if they suit your requirements.
            • Registers the bean definitions
            • Returns the annotation attributes for repeatable class
            • Create bean definition
            • Encode batch operations in batch
            • Encode a plaintext plaintext
            • Encode a plaintext string
            • Performs a patch on the specified path
            • Perform a GET call with the specified path and response type
            • Get the value of the vault response
            • Perform a get operation with the given path and response type
            • Schedules the renew token
            • Creates a new user ID
            • Inserts an object with the given id
            • Handle a secret event
            • Gets a policy by name
            • Creates or updates a policy
            • Returns a pageable page of revisions
            • Wrap the specified object with TTL
            • Deletes the specified entity instance
            • Initialize the properties from the vault
            • Fetch properties from vault
            • Returns client authentication
            • Registers the root bean definitions for the root repository
            • Updates an existing key - value pair
            • Returns an iterator over all entries in a keyspace
            • Reads an object from the input stream
            Get all kandi verified functions for this library.

            spring-vault Key Features

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

            spring-vault Examples and Code Snippets

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

            Community Discussions

            QUESTION

            Config server with Vault backend - fetch secrets from multiple paths
            Asked 2022-Feb-04 at 13:28

            We are using config server with Vault backend to fetch application secrets. Config server project is using spring-vault-core dependency and spring-vault-dependencies dependency management for Vault.

            Vault related config in application yml file is as follows:

            ...

            ANSWER

            Answered 2022-Feb-04 at 13:28

            You can take a look to the composite profile.

            There are a lot of additional questions - what exactly you are trying to do, and why do you want to have this?

            For us, for example, it was important to split infra services configurations and also split, actually, microservices configurations by itself. And, important requirement, to be able to "overwrite" it (in case of migrations, for instance).

            We have achieve that with two things:

            • on config server side we are using composite configuration (with exactly the same type and uri, but little bit different backend and keys),
            • on config client's side we are specifying several values for spring.cloud.config.name property (coma separated list).

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

            QUESTION

            Error with Spring AppRoleAuthentication - URI is not absolute
            Asked 2021-Apr-15 at 13:31

            I'm trying to retrieve secrets from vault using the AppRole authentication. But I get the error :

            java.lang.IllegalArgumentException: URI is not absolute

            What I do is create a vaultEndpoint then depending on the method choosen I use token authentication or AppRole authentication. There's no issue with the token authentication, however whenever I try to retrive a secret or even get the vaultToken to login with AppRole the URI is not absolute error occurs.

            I 've seen in https://docs.oracle.com/javase/8/docs/api/java/net/URI.html that an URI is absolute when it specifies a scheme otherwise it is relative. But I think that my URI is specifing a scheme.

            So I'm a bit lost here. Does anyone know what I am doing wrong ? Or why I get this error ?

            I use spring-vault-core-2.2.0.RELEASE

            Here's my code :

            ...

            ANSWER

            Answered 2021-Apr-15 at 13:31

            I managed to fix my problem, I updated the original post to share the answer.

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

            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

            KafkaProducer InterruptedException during gracefull shutdown on spring boot application
            Asked 2021-Jan-05 at 21:58

            For a project we are sending some events to kafka. We use spring-kafka 2.6.2.

            Due to usage of spring-vault we have to restart/kill the application before the end of credentials lease (application is automatically restarted by kubernetes). Our problem is that when using applicationContext.close() to proceed with our gracefull shutdown, KafkaProducer gets an InterruptedException Interrupted while joining ioThread inside it's close() method. It means that in our case some pending events are not sent to kafka before shutdown as it's forced to close due to an error during destroy.

            Here under a stacktrace

            ...

            ANSWER

            Answered 2021-Jan-05 at 21:58

            future.cancel(true);

            This is interrupting the producer thread and is likely the root cause of the problem.

            You should use future.cancel(false); to allow the task to terminate in an orderly fashion, without interruption.

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

            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

            Spring vault does not use the new token after login
            Asked 2020-Aug-05 at 14:08

            I am trying to read secrets from vault using Spring vault cloud. I use a service token type.

            In my set-up the max_ttl is set to 1h and ttl to 10 minutes, so the token will be renewed at every 10 minutes till the max_ttl is reached. Once the max_ttl is reached, the token will be dropped/revoked and a new login is performed, receving a new token.

            The issue is that when trying to read secrets, the old expired token is still used.

            Any idea why this happens?

            Using:

            • spring-cloud-config-2.2.3
            • spring-vault-core-2.2.0
            • Kubernetes

            Vault audit logs:

            ...

            ANSWER

            Answered 2020-Aug-05 at 14:08

            The issue does not reproduce anymore as we disable the use of the reactive org.springframework.vault.authentication.ReactiveLifecycleAwareSessionManager in favor of the "classic: one: org.springframework.vault.authentication.LifecycleAwareSessionManager.

            For disabling it, we set: spring.cloud.vault.reactive.enabled=false

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

            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

            Spring Vault SSLPeerUnverifiedException
            Asked 2020-Mar-10 at 05:47

            I have an application running in Spring Boot, using Spring Vault to retrieve passwords. It is using KubernetesAuthentication to log in. This worked well until I upgraded to Spring Boot 2.2.5. I then started to get SSLPeerUnverifiedException.

            ...

            ANSWER

            Answered 2020-Mar-10 at 05:47

            This was caused by a bug introduced in HttpClient version 4.5.11. Fixed in 4.5.12

            https://issues.apache.org/jira/browse/HTTPCLIENT-2047

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

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

            Vulnerabilities

            No vulnerabilities reported

            Install spring-vault

            To get started with Vault and this guide you need a *NIX-like operating systems that provides:. Vault is started listening on 0.0.0.0:8200 using the inmem storage and https. Vault is sealed and not initialized when starting up so you need to initialize it first.
            curl, openssl and unzip
            at least Java 8 and a properly configured JAVA_HOME environment variable

            Support

            For a comprehensive treatment of all the Spring Vault features, please refer to:.
            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-projects/spring-vault.git

          • CLI

            gh repo clone spring-projects/spring-vault

          • sshUrl

            git@github.com:spring-projects/spring-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-projects

            spring-boot

            by spring-projectsJava

            spring-framework

            by spring-projectsJava

            spring-security

            by spring-projectsJava

            spring-petclinic

            by spring-projectsCSS

            spring-mvc-showcase

            by spring-projectsJava