Skip to content

Commit b1ff157

Browse files
authored
Merge pull request #13 from blasttoys/development
v2.1.1
2 parents 95e1cc9 + e87f339 commit b1ff157

File tree

5 files changed

+28
-30
lines changed

5 files changed

+28
-30
lines changed

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
# Change Log
22

3+
### V2.1.1
4+
5+
- Fixed vulnerability CVE-2021-44228
6+
- Update to log4j version 2.15.0
7+
8+
### V2.1
9+
10+
- Release for APEX 2
11+
312
### V2.0.0-SNAPSHOT
413

514
- Library to use authParam

README.md

Lines changed: 7 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ mvn package
4545
```
4646

4747
The compiled _jar_ file will be located in the **target** folder
48-
+ java-apex-api-security-<version>-SNAPSHOT.jar
49-
+ java-apex-api-security-<version>-SNAPSHOT-jar-with-dependencies.jar (this includes log4j libraries)
48+
+ java-apex-api-security-<version>.jar
49+
+ java-apex-api-security-<version>-jar-with-dependencies.jar (this includes log4j libraries)
5050

5151
Import this jar file into your java classpath to use the utility class
5252

@@ -64,7 +64,7 @@ mvn install
6464
<dependency>
6565
<groupId>com.api.util</groupId>
6666
<artifactId>ApiSecurity</artifactId>
67-
<version>2.0.0-SNAPSHOT</version>
67+
<version>2.1.1</version>
6868
</dependency>
6969
```
7070

@@ -76,12 +76,12 @@ mvn install
7676
<dependency>
7777
<groupId>org.apache.logging.log4j</groupId>
7878
<artifactId>log4j-api</artifactId>
79-
<version>2.14.1</version>
79+
<version>2.15.0</version>
8080
</dependency>
8181
<dependency>
8282
<groupId>org.apache.logging.log4j</groupId>
8383
<artifactId>log4j-core</artifactId>
84-
<version>2.14.1</version>
84+
<version>2.15.0</version>
8585
</dependency>
8686
```
8787

@@ -125,7 +125,7 @@ gradle test jacocoTestReport
125125
```
126126

127127
The compiled _jar_ file will be located in the **build/libs** folder
128-
+ java-apex-api-security-2.0.0-SNAPSHOT.jar
128+
+ java-apex-api-security-2.1.1.jar
129129

130130
Import this jar into your java classpath to use the utility class
131131

@@ -140,7 +140,7 @@ repositories {
140140
mavenLocal()
141141
}
142142
dependencies {
143-
compile group: 'com.api.util', name: 'ApiSecurity', version: '2.0.0-SNAPSHOT'
143+
compile group: 'com.api.util', name: 'ApiSecurity', version: '2.1.1'
144144
}
145145
146146
```
@@ -166,23 +166,6 @@ Authorization: Apex_l1_eg realm="https://XYZ.api.gov.sg/abc/def", apex_l1_eg_app
166166

167167
### Parameters
168168

169-
#### realm
170-
This is an identifier for the caller. Any value can be used here.
171-
172-
**Note:** This is currently handled by the library
173-
174-
#### authPrefix
175-
176-
Authorization Header scheme prefix. There are 4 possible values for this
177-
depending on the zone and the authentication method.
178-
179-
1. Apex_l1_ig
180-
2. Apex_l1_eg
181-
3. Apex_l2_ig
182-
4. Apex_l2_eg
183-
184-
**Note:** This is currently handled by the library
185-
186169
#### httpMethod
187170

188171
The HTTP method, i.e. `GET`, `POST`, etc.

build.gradle

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ plugins {
44
id 'com.github.kt3k.coveralls' version '2.6.3'
55
}
66

7-
version '2.0.0-SNAPSHOT'
7+
8+
version '2.1.1'
89

910
tasks.withType(JavaCompile) {
1011
options.encoding = "UTF-8"
@@ -19,8 +20,8 @@ dependencies {
1920

2021
//gradle 4.0
2122
compile group: 'commons-lang', name: 'commons-lang', version: '2.4'
22-
compile group: 'org.apache.logging.log4j', name: 'log4j-api', version: '2.14.1'
23-
compile group: 'org.apache.logging.log4j', name: 'log4j-core', version: '2.14.1'
23+
compile group: 'org.apache.logging.log4j', name: 'log4j-api', version: '2.15.0'
24+
compile group: 'org.apache.logging.log4j', name: 'log4j-core', version: '2.15.0'
2425
compile group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.10.5.1'
2526
compile group: 'com.googlecode.json-simple', name: 'json-simple', version: '1.1.1'
2627
compile group: 'org.bouncycastle', name: 'bcpkix-jdk15on', version: '1.69'

pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<modelVersion>4.0.0</modelVersion>
33
<groupId>com.api.util</groupId>
44
<artifactId>ApiSecurity</artifactId>
5-
<version>2.0.0-SNAPSHOT</version>
5+
<version>2.1.1</version>
66
<build>
77
<plugins>
88
<plugin>
@@ -80,12 +80,12 @@
8080
<dependency>
8181
<groupId>org.apache.logging.log4j</groupId>
8282
<artifactId>log4j-api</artifactId>
83-
<version>2.14.1</version>
83+
<version>2.15.0</version>
8484
</dependency>
8585
<dependency>
8686
<groupId>org.apache.logging.log4j</groupId>
8787
<artifactId>log4j-core</artifactId>
88-
<version>2.14.1</version>
88+
<version>2.15.0</version>
8989
</dependency>
9090
<dependency>
9191
<groupId>commons-lang</groupId>

src/main/java/com/api/util/ApiSecurity/ApiSigning.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@
1616
import org.bouncycastle.pkcs.PKCS8EncryptedPrivateKeyInfo;
1717

1818

19+
import org.bouncycastle.operator.InputDecryptorProvider;
20+
import org.bouncycastle.pkcs.PKCS8EncryptedPrivateKeyInfo;
21+
22+
1923
import javax.crypto.Mac;
2024
import javax.crypto.spec.SecretKeySpec;
2125

@@ -612,6 +616,7 @@ public static String getBaseString(String authPrefix
612616

613617
String baseString = null;
614618

619+
615620
try {
616621
authPrefix = authPrefix.toLowerCase();
617622

0 commit comments

Comments
 (0)