Commit Graph

105 Commits

Author SHA1 Message Date
Mark Paluch
d772003bbd [maven-release-plugin] prepare release 2.0.3.RELEASE
See gh-330
2018-11-14 09:27:01 +01:00
Mark Paluch
eb8430c062 Update changelog.
See gh-330
2018-11-14 08:56:03 +01:00
Mark Paluch
b179ceee7e [maven-release-plugin] prepare for next development iteration 2018-09-10 15:03:01 +02:00
Mark Paluch
77d821cfb5 [maven-release-plugin] prepare release 2.0.2.RELEASE 2018-09-10 15:03:01 +02:00
Mark Paluch
97ce845bea Update changelog.
See gh-307.
2018-09-10 14:59:34 +02:00
Mark Paluch
36a5daf00c Generate subject alt name in local certificate.
Closes gh-274.
2018-07-31 10:10:05 +02:00
Mark Paluch
a39f1be6ad Upgrade to Vault 0.10.3.
Closes gh-258.
2018-06-20 20:09:34 +02:00
Mark Paluch
52caecb171 Bind Kubernetes to fixed versions to avoid instabilities 2018-04-11 15:04:22 +02:00
Mark Paluch
746958d187 Upgrade to Vault 0.10.0.
Closes gh-240.
2018-04-11 14:54:34 +02:00
Mark Paluch
3bfed52adc [maven-release-plugin] prepare for next development iteration
See gh-229.
2018-04-04 17:46:21 +02:00
Mark Paluch
c725dcff33 [maven-release-plugin] prepare release 2.0.1.RELEASE
See gh-229.
2018-04-04 17:45:39 +02:00
Mark Paluch
b024ebf495 Update changelog.
See gh-229.
2018-04-04 17:42:26 +02:00
Mark Paluch
972e77556d Upgrade to Vault 0.9.5.
Reduce build matrix by removal of intermediate Vault versions.

Closes gh-212.
2018-03-07 09:00:31 +01:00
Mark Paluch
b3a6322951 Polishing.
Fix JavaDoc and reference doc versions and links.

See gh-198.
2018-02-20 10:01:17 +01:00
Mark Paluch
d2c83b818f Prepare for next development iteration.
See gh-198.
2018-02-20 10:01:13 +01:00
Mark Paluch
4b1061d153 [maven-release-plugin] prepare release 2.0.0.RELEASE
See gh-198.
2018-02-20 09:43:14 +01:00
Mark Paluch
0d56e7695f Update changelog.
See gh-198.
2018-02-20 09:23:55 +01:00
Mark Paluch
443fc03f8a Polishing 2018-01-31 16:07:53 +01:00
Mark Paluch
ef84690804 Upgrade to Vault 0.9.3.
Closes gh-192.
2018-01-31 16:07:48 +01:00
Mark Paluch
8f19127584 [maven-release-plugin] prepare for next development iteration 2018-01-25 09:48:54 +01:00
Mark Paluch
a94cbc15ae [maven-release-plugin] prepare release 2.0.0.RC2 2018-01-25 09:48:53 +01:00
Mark Paluch
11a346ef2b Polishing.
Adjust generics and wording in reactive Template API.
2018-01-25 09:44:34 +01:00
Mark Paluch
6791533e0e Update changelog.
See gh-190.
2018-01-25 09:34:43 +01:00
Mark Paluch
28ff17d4f8 Add VaultBytesEncryptor and VaultBytesKeyGenerator.
We now provide a Spring Security integration for Vault transit-based BytesEncryptor and BytesKeyGenerator.

VaultOperations operations = …;
VaultBytesKeyGenerator generator = new VaultBytesKeyGenerator(operations);

byte[] key = generator.generateKey();

VaultTransitOperations transit = …;
VaultBytesEncryptor encryptor = new VaultBytesEncryptor(transit, "my-key-name");

byte[] ciphertext = encryptor.encrypt(plaintext);
byte[] decrypted = encryptor.decrypt(ciphertext);

Closes gh-187.
2018-01-22 12:11:05 +01:00
Mark Paluch
b122d7510c [maven-release-plugin] prepare for next development iteration
See gh-173.
2017-11-15 08:22:50 +01:00
Mark Paluch
1010a9379f Polishing. 2017-11-15 08:22:47 +01:00
Mark Paluch
e0a5b92cb9 Update changelog.
See gh-173.
2017-11-15 08:09:16 +01:00
Mark Paluch
1ab9bcd5ac Upgrade to Vault 0.9.0.
Closes gh-172.
2017-11-14 22:08:47 +01:00
Mark Paluch
00b6a55689 Enhance VaultToken with self-lookup using LifecycleAwareSessionManager.
We now enhance VaultTokens obtained from a ClientAuthentication with a self-lookup to determine renewability and the remaining TTL. Self-lookup creates a LoginToken: We need to make sure to only revoke tokens that were initially a LoginToken supplied by the authentication and not LoginToken created by augmentation.

Closes gh-161.
2017-11-14 12:33:28 +01:00
Mark Paluch
33397e7002 Adapt to TravisCI changes.
Closes gh-171.
2017-11-14 10:37:57 +01:00
Mark Paluch
ebd9d4da29 Move minikube start from start.sh to Travis build definition.
See gh-143, gh-166.
2017-11-02 13:03:33 +01:00
Mark Paluch
e5f96dd352 Polishing.
Rename Kube* authentication classes to Kubernetes*. Refactor KubernetesJwtSupplier to extend Supplier<String>. Load token file content eagerly. Extend Javadoc. Reformat code. Remove superfluous exception declarations in tests. Remove commented code from local_run_k8s.sh. Copy CA file from pod.

Reinstantiate AuthenticationStepsFactory for KubernetesAuthentication.

Add Kubernetes authentication to the reference documentation.

Original pull request: gh-166.
Related ticket: gh-143.
Closes gh-166.
2017-11-01 19:25:32 +01:00
Michal Budzyn
696d047760 Add authentication for Kubernetes Service Account Token
We now support authentication via Kubernetes using Service Account Tokens.

KubernetesAuthenticationOptions options = KubernetesAuthenticationOptions.builder().role("dev-role").build();
KubernetesAuthentication authentication = new KubernetesAuthentication(options, restTemplate);

Original pull request: gh-166.
Closes gh-143.
2017-11-01 19:25:22 +01:00
Mark Paluch
cfb84fe2b5 Encapsulate RoleId and SecretId modes for AppRole authentication.
Encapsulate RoleId and SecretId modes (pull, provided, wrapped, absent) with value objects. Adapt AppRoleAuthentication for imperative and AuthenticationSteps authentication. Split imperative and AuthenticationSteps tests.

Use the deprecated cubbyhole response unwrapping endpoint to unwrap responses.

Original pull request: gh-165.
Closes: gh-165.
2017-10-25 15:15:35 +02:00
Mark Paluch
b30d81fa43 Support CSR signing, certificate revocation and CRL retrieval.
We now support CSR signing, certificate revocation and CRL retrieval via VaultPkiTemplate.

Closes gh-125.
2017-10-19 08:18:20 +02:00
Mark Paluch
d1a778e6a7 [maven-release-plugin] prepare for next development iteration
See gh-155.
2017-10-06 08:05:55 +02:00
Mark Paluch
e7986350bd [maven-release-plugin] prepare release 2.0.0.M3
See gh-155.
2017-10-06 08:04:45 +02:00
Mark Paluch
4ba7566d6b Merge repository support into Spring Vault Core.
Closes gh-157.
2017-10-05 17:45:21 +02:00
Mark Paluch
c2a71e7187 Update changelog.
See gh-153.
2017-10-05 17:45:20 +02:00
Mark Paluch
209e0b2d37 Add support for policies.
We now support policy management via Vault's policy endpoint to enumerate policy names, read, write and delete policies. Policy parsing support is limited to JSON as there is no Java HCL parser.

Closes gh-10.
2017-09-27 15:54:00 +02:00
Mark Paluch
7ad054442c Adapt to changed Spring Framework 5 documentation structure.
Closes gh-147.
2017-09-27 15:35:16 +02:00
Mark Paluch
4efbc8f380 Upgrade to Vault 0.8.3.
Accept generic and key/value for the key/value secret backend.

Closes gh-142.
2017-09-21 17:50:00 +02:00
Mark Paluch
1896f2bad0 Polishing.
Rename VaultDecryptionPayload to Ciphertext and VaultEncryptionPayload to Plaintext. Move methods of VaultEncryptionDecryptionResultHelper to VaultTrainsitTemplate. Extract common base class from VaultDecryptionResult and VaultEncryptionResult. Refactor value objects to immutable objects. Create encrypt(…) and decrypt(…) methods interchanging Plaintext and Ciphertext objects. Generate equals/hashcode methods for Plaintext, Ciphertext and VaultTransitContext. Simplify tests. Javadoc, license headers, formatting, typo fixes.

Original pull request: gh-138.
Related ticket: gh-137.
2017-09-18 11:03:33 +02:00
Praveendra Singh
8abcb0b3a0 Added transit batch encrypt and decrypt support.
We now support batch encryption and decryption via VaultTransitOperations.

List<VaultEncryptionResult> batchEncryption = transitOperations.encrypt("mykey", Arrays.asList(Plaintext.of("hello"), Plaintext.of("world")));

Ciphertext encryptedHello = batchEncryption.get(0).get();
Ciphertext encryptedWorld = batchEncryption.get(1).get();

List<VaultDecryptionResult> batchDecryption = transitOperations.decrypt("mykey", Arrays.asList(encryptedHello, encryptedWorld));

Original pull request: gh-138.
Related ticket: gh-137.
Closes gh-138.
2017-09-18 10:48:29 +02:00
Mark Paluch
de22a51b48 Polishing.
Fetch SecretId if no secretId is configured but an initial token is provided instead of relying on a configured role name. Use configured AppRole mount path instead of static literal. Reorder methods, add since and author tags. Reduce tests to AppRoleAuthenticationOptions code. Add further test cases. Add integration tests. Formatting, fix typos.

Original pull request: gh-133.
Related ticket: gh-132.
2017-09-07 17:26:47 +02:00
Vincent Le Nair
c76a7b17f0 Support AppRole authentication pull mode.
We now support AppRole authentication pull mode by fetching roleId/secretId from Vault's AppRole auth backend using an initial (ephemeral token) if roleId/secretId are not configured.

Original pull request: gh-133.
Related ticket: gh-132.
2017-09-07 16:48:47 +02:00
Mark Paluch
9fc745b012 Upgrade to Vault 0.8.2.
Closes gh-134.
2017-09-07 15:17:52 +02:00
Mark Paluch
b916d4c6e7 Vault repository support.
We now support Spring Data Repositories via Spring Data's KeyValue module. Domain objects can be mapped to JSON using a custom converter and created, update, deleted and queried using the repository abstraction. Vault repositories support query derivation limited to predicates on the Id property with paging and sorting.

@Configuration
@EnableVaultRepositories
public class ApplicationConfig {

  @Bean
  public VaultTemplate vaultTemplate() {
    return new VaultTemplate(…);
  }
}

@Test
public void loadAndSave() {

	Credentials heisenberg = new Credentials();
	heisenberg.setId("heisenberg");
	heisenberg.setPassword("327215");

	vaultRepository.save(heisenberg);

	Iterable<Credentials> all = vaultRepository.findAll();
  //
}

interface CredentialsRepository extends PagingAndSortingRepository<Credentials, String> {

}

@Data
public class Credentials {

	@Id String id;
	String password;
}

GET https://localhost:8200/v1/secret/credentials/heisenberg

HTTP/1.1 200 OK
Content-Type: application/json

{
  // …
  "renewable": false,
  "lease_duration": …,
  "data": {
    "_class": "com.example.Credentials",
    "password": "327215"
  },
  // …
}

See gh-128.
2017-09-06 22:02:43 +02:00
Mark Paluch
be20e49198 Upgrade to Vault 0.8.1.
Closes gh-127.
2017-08-21 13:39:40 +02:00
Mark Paluch
d43313d6b9 Upgrade to Reactor 3.1.0 M3.
Closes gh-121.
2017-07-27 08:14:54 +02:00