Skip to content

Commit b2726ad

Browse files
author
Rathna Natarajan
committed
#32 Set keyid as alias name for JWT Sign filter
1 parent 8cf2311 commit b2726ad

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,9 +130,10 @@ environment:
130130

131131
|environment variable Name | Filter / Connection Name | Description|
132132
--- | --- | ---
133-
|jwtsigncert_name|Connect to URL| Public certificate path or base64 encoded content |
134-
|jwtsignkey_name|Connect to URL| Private key of the certificate path or base64 encoded content |
135-
|jwtsigncacert_name|Connect to URL| CA certificate path or baseb4 encoded content |
133+
|jwtsigncert_name|JWT Sign| Public certificate path or base64 encoded content |
134+
|jwtsignkey_name|JWT Sign| Private key of the certificate path or base64 encoded content |
135+
|jwtsigncacert_name|JWT Sign| CA certificate path or baseb4 encoded content |
136+
|jwtsignkid_name|JWT Sign| Kid corresponding to certificate set as alias name in JWT Sign filter |
136137

137138
### Example
138139

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>com.axway</groupId>
88
<artifactId>apim-env-module</artifactId>
9-
<version>1.1.6</version>
9+
<version>1.1.7</version>
1010

1111
<name>apim-env-module</name>
1212
<url>https://axway.com</url>

src/main/java/com/axway/ExternalConfigLoader.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,11 @@ private void updatePassword(EntityStore entityStore) {
160160
Trace.info("Updating JWT Sign - Signing key");
161161
String pemKey = System.getenv("jwtsignkey" + "_" + filterName);
162162
String caCert = System.getenv("jwtsigncacert" + "_" + filterName);
163-
String alias = importCertAndKeyAndCA(entityStore, passwordValue, caCert, pemKey).getAlias();
163+
String alias = System.getenv("jwtsignkid" + "_" + filterName);
164+
PKCS12 pkcs12 = importCertAndKeyAndCA(entityStore, passwordValue, caCert, pemKey);
165+
if( alias == null){
166+
alias = pkcs12.getAlias();
167+
}
164168
Trace.info("Pem file alias name :" + alias);
165169
jwtSignConfigureP12(entityStore, filterName, alias);
166170
} catch (Exception e) {

0 commit comments

Comments
 (0)