Skip to content

Commit

Permalink
Merge pull request #111 from MicroProfileJWT/master
Browse files Browse the repository at this point in the history
Document mapping of config properties to allowable env variable names
  • Loading branch information
starksm64 authored Sep 11, 2018
2 parents 7bc0f18 + 2bf61d6 commit c0a0cf2
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 1 deletion.
21 changes: 21 additions & 0 deletions spec/src/main/asciidoc/configuration.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -356,3 +356,24 @@ return Public Key text in one of the supported formats.

The `mp.jwt.verify.issuer` config property allows for the expected value of the `iss`
claim to be specified. A MicroProfile JWT implementation must verify the `iss` claim of incoming JWTs is present and matches the configured value of `mp.jwt.verify.issuer`.


#### Mapping Properties to Environment Variables
When using environment variables to specify the MP-JWT configuration properties defined in this section,
note that some operating systems allow only alphabetic characters and underscores in environment variables.
Since characters such as '.' may be disallowed, in order to set a value for a config property such as `mp.jwt.verify.publickey`
using an environment variable, the following mapping rules from the MP configuration spec are relevant:

When searching environment variables for configuration properties, the following transformation is applied to
attempt to find a match:

* Exact match (i.e. mp.jwt.verify.publickey)
* Replace nonalphanumeric characters with '_' (i.e. mp_jwt_verify_publickey)
* Replace nonalphanumeric characters with '_' and convert to uppercase (i.e. MP_JWT_VERIFY_PUBLICKEY)

With these rules, the matching portable environment variables names for the current MP-JWT configuration
properties are:

`mp.jwt.verify.publickey` :: mp_jwt_verify_publickey or MP_JWT_VERIFY_PUBLICKEY
`mp.jwt.verify.publickey.location` :: mp_jwt_verify_publickey_location or MP_JWT_VERIFY_PUBLICKEY_LOCATION
`mp.jwt.verify.issuer` :: mp_jwt_verify_issuer or MP_JWT_VERIFY_ISSUER
14 changes: 13 additions & 1 deletion spec/src/main/asciidoc/release-notes.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,20 @@
//
## Release Notes

### Changes in 1.1.1-RC2

This candidate patch release provides one additional TCK test fix, and information on how to use the MP-JWT
configuration properties as environment variables on platforms that don't allow dots '.' in their names.

There are no API changes.

#### Closed Issues in 1.1.1-RC2
https://github.com/eclipse/microprofile-jwt-auth/issues/104
https://github.com/eclipse/microprofile-jwt-auth/issues/107

### Changes in 1.1.1-RC1
This is a candidate patch release that provides fixes to the TCK tests that were seen to have issues in different implementations. The TCK tests WARs now include a META-INF/MPJWTTESTVERSION resource that contains the major/minor version string enum for the MP-JWT version the test WAR is targeting. Currently the versions enums are:
This is a candidate patch release that provides fixes to the TCK tests that were seen to have issues in different implementations.
The TCK tests WARs now include a META-INF/MPJWTTESTVERSION resource that contains the major/minor version string enum for the MP-JWT version the test WAR is targeting. Currently the versions enums are:

```java
public enum MpJwtTestVersion {
Expand Down

0 comments on commit c0a0cf2

Please sign in to comment.