diff --git a/README.adoc b/README.adoc index 09f549cd..35e27ab0 100644 --- a/README.adoc +++ b/README.adoc @@ -159,63 +159,6 @@ spring.cloud.vault: token: vault-token ---- -=== AppId authentication - -Vault supports https://www.vaultproject.io/docs/auth/app-id.html[AppId] -authentication that consists of two hard to guess tokens. The AppId -defaults to `spring.application.name` that is statically configured. -The second token is the UserId which is a part determined by the application, -usually related to the runtime environment. IP address, Mac address or a -Docker container name are good examples. Spring Cloud Vault Config supports -IP address, Mac address and static UserId's (e.g. supplied via System properties). -The IP and Mac address are represented as Hex-encoded SHA256 hash. - -IP address-based UserId's use the local host's IP address. - -[source,yaml] -.bootstrap.yml using SHA256 IP-Address UserId's ----- -spring.cloud.vault: - enabled: true - authentication: APPID - app-id: - user-id: IP_ADDRESS ----- - -The corresponding command to generate the IP address UserId from a command line is: - ----- -$ echo -n 192.168.99.1 | sha256sum ----- -NOTE: Including the line break of `echo` leads to a different hash value -so make sure to include the `-n` flag. - -Mac address-based UserId's obtain their network device from the -localhost-bound device. The configuration also allows specifying -a `network-interface` hint to pick the right device. The value of -`network-interface` is optional and can be either an interface -name or interface index (0-based). - -[source,yaml] -.bootstrap.yml using SHA256 Mac-Address UserId's ----- -spring.cloud.vault: - enabled: true - authentication: APPID - app-id: - user-id: MAC_ADDRESS - network-interface: eth0 ----- - -The corresponding command to generate the IP address UserId from a command line is: - ----- -$ echo -n 0AFEDE1234AC | sha256sum ----- - -NOTE: The Mac address is specified uppercase and without colons. -Including the line break of `echo` leads to a different hash value -so make sure to include the `-n` flag. == Building @@ -279,24 +222,21 @@ If you don't have an IDE preference we would recommend that you use http://www.springsource.com/developer/sts[Spring Tools Suite] or http://eclipse.org[Eclipse] when working with the code. We use the http://eclipse.org/m2e/[m2eclipe] eclipse plugin for maven support. Other IDEs and tools -should also work without issue. +should also work without issue as long as they use Maven 3.3.3 or better. ==== Importing into eclipse with m2eclipse We recommend the http://eclipse.org/m2e/[m2eclipe] eclipse plugin when working with eclipse. If you don't already have m2eclipse installed it is available from the "eclipse marketplace". -Unfortunately m2e does not yet support Maven 3.3, so once the projects -are imported into Eclipse you will also need to tell m2eclipse to use -the `.settings.xml` file for the projects. If you do not do this you -may see many different errors related to the POMs in the -projects. Open your Eclipse preferences, expand the Maven -preferences, and select User Settings. In the User Settings field -click Browse and navigate to the Spring Cloud project you imported -selecting the `.settings.xml` file in that project. Click Apply and -then OK to save the preference changes. - -NOTE: Alternatively you can copy the repository settings from https://github.com/spring-cloud/spring-cloud-build/blob/master/.settings.xml[`.settings.xml`] into your own `~/.m2/settings.xml`. +NOTE: Older versions of m2e do not support Maven 3.3, so once the +projects are imported into Eclipse you will also need to tell +m2eclipse to use the right profile for the projects. If you +see many different errors related to the POMs in the projects, check +that you have an up to date installation. If you can't upgrade m2e, +add the "spring" profile to your `settings.xml`. Alternatively you can +copy the repository settings from the "spring" profile of the parent +pom into your `settings.xml`. ==== Importing into eclipse without m2eclipse If you prefer not to use m2eclipse you can generate eclipse project metadata using the @@ -310,40 +250,6 @@ following command: The generated eclipse projects can be imported by selecting `import existing projects` from the `file` menu. -==== Adding Project Lombok Agent - -Spring Cloud uses http://projectlombok.org/features/index.html[Project Lombok] -to generate getters and setters etc. Compiling from the command line this -shouldn't cause any problems, but in an IDE you need to add an agent -to the JVM. Full instructions can be found in the Lombok website. The -sign that you need to do this is a lot of compiler errors to do with -missing methods and fields, e.g. - -[indent=0] ----- -The method getInitialStatus() is undefined for the type EurekaInstanceConfigBean EurekaDiscoveryClientConfiguration.java /spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/eureka line 120 Java Problem -The method getInitialStatus() is undefined for the type EurekaInstanceConfigBean EurekaDiscoveryClientConfiguration.java /spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/eureka line 121 Java Problem -The method setNonSecurePort(int) is undefined for the type EurekaInstanceConfigBean EurekaDiscoveryClientConfiguration.java /spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/eureka line 112 Java Problem -The type EurekaInstanceConfigBean.IdentifyingDataCenterInfo must implement the inherited abstract method DataCenterInfo.getName() EurekaInstanceConfigBean.java /spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/eureka line 131 Java Problem -The method getId() is undefined for the type ProxyRouteLocator.ProxyRouteSpec PreDecorationFilter.java /spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/zuul/filters/pre line 60 Java Problem -The method getLocation() is undefined for the type ProxyRouteLocator.ProxyRouteSpec PreDecorationFilter.java /spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/zuul/filters/pre line 55 Java Problem ----- - -==== Importing into Intellij -Spring Cloud projects use annotation processing, particularly Lombok, which requires configuration -or you will encounter compile problems. It also needs a specific version of maven and a profile -enabled. Intellij 14.1+ requires some configuration to ensure these are setup properly. - - 1. Click Preferences, Plugins. *Ensure Lombok is installed* - 2. Click New, Project from Existing Sources, choose your spring-cloud project directory - 3. Choose Maven, and select Environment Settings. *Ensure you are using Maven 3.3.3* - 4. In the next screen, *Select the profile `spring`* click Next until Finish. - 5. Click Preferences, "Build, Execution, Deployment", Compiler, Annotation Processors. *Click Enable Annotation Processing* - 6. Click Build, Rebuild Project, and you are ready to go! - -==== Importing into other IDEs -Maven is well supported by most Java IDEs. Refer to you vendor documentation. - == Contributing