Merge pull request #43 from maxlambrecht/docs-improvements
Minor improvements in READMEs and javadocs.
This commit is contained in:
commit
2f295c86ab
|
|
@ -10,7 +10,7 @@ import java.util.Arrays;
|
|||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* Represents a SPIFFE ID as defined in SPIFFE standard.
|
||||
* Represents a SPIFFE ID as defined in the SPIFFE standard.
|
||||
* <p>
|
||||
* @see <a href="https://github.com/spiffe/spiffe/blob/master/standards/SPIFFE-ID.md">https://github.com/spiffe/spiffe/blob/master/standards/SPIFFE-ID.md</a>
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ import java.net.URI;
|
|||
import java.net.URISyntaxException;
|
||||
|
||||
/**
|
||||
* Represents a normalized SPIFFE trust domain (e.g. 'domain.test').
|
||||
* Represents the name of a SPIFFE trust domain (e.g. 'domain.test').
|
||||
*/
|
||||
@Value
|
||||
public class TrustDomain {
|
||||
|
|
|
|||
|
|
@ -1,14 +1,12 @@
|
|||
# Java SPIFFE Provider
|
||||
|
||||
This module provides a Java Security Provider implementation supporting X.509-SVIDs and methods for
|
||||
creating SSLContexts that are backed by the Workload API.
|
||||
creating `SSLContext` that are backed by the Workload API.
|
||||
|
||||
## Create an SSL Context backed by the Workload API
|
||||
|
||||
To create an SSL Context that uses a `X509Source` backed by the Workload API, having the environment variable
|
||||
` SPIFFE_ENDPOINT_SOCKET` defined with the Workload API endpoint address.
|
||||
The `SSLContext` is configured with a set of SPIFFE IDs that the current workload
|
||||
will trust for TLS connections:
|
||||
To create an `javax.net.ssl.SSLContext` that is backed by the Workload API through a `X509Source`, having the environment variable
|
||||
` SPIFFE_ENDPOINT_SOCKET` defined with the Workload API endpoint address:
|
||||
|
||||
```
|
||||
X509Source source = DefaultX509Source.newSource();
|
||||
|
|
@ -20,9 +18,12 @@ will trust for TLS connections:
|
|||
.build();
|
||||
|
||||
SSLContext sslContext = SpiffeSslContextFactory.getSslContext(options);
|
||||
```
|
||||
```
|
||||
|
||||
Alternatively, a different Workload API address can be used by passing it to the X509Source creation method.
|
||||
The `SSLContext` is configured with a set of SPIFFE IDs that will be trusted for TLS connections.
|
||||
|
||||
|
||||
Alternatively, a different Workload API address can be used by passing it to the `X509Source` creation method.
|
||||
|
||||
```
|
||||
X509SourceOptions sourceOptions = X509SourceOptions
|
||||
|
|
@ -154,7 +155,7 @@ A Tomcat TLS connector that uses the `Spiffe` KeyStore can be configured as foll
|
|||
|
||||
### Create mTLS GRPC server and client
|
||||
|
||||
Prerequisite: Having the SPIFFE Provided configured through the `java.security`.
|
||||
Prerequisite: Having the SPIFFE Provider configured through the `java.security`.
|
||||
|
||||
A `GRPC Server` using an SSL context backed by the Workload API:
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue