Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document mapping of config properties to allowable env variable names #111

Merged
merged 2 commits into from
Sep 11, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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