Skip to content

Commit b8660a2

Browse files
authored
Merge branch 'main' into dependabot/maven/org.apache.felix-maven-bundle-plugin-6.0.0
2 parents cdefe90 + 077e460 commit b8660a2

18 files changed

+528
-14
lines changed

.github/wordlist.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ ClusterPipeline
1616
ClusterPubSub
1717
ConnectionPool
1818
CoreCommands
19+
Entra
20+
EntraID
1921
EVAL
2022
EVALSHA
2123
Failback
@@ -30,6 +32,7 @@ GeoRadiusParam
3032
GeoRadiusStoreParam
3133
GeoUnit
3234
GraphCommands
35+
Gradle
3336
Grokzen's
3437
HostAndPort
3538
HostnameVerifier
@@ -41,6 +44,7 @@ JSONArray
4144
JSONCommands
4245
Jaeger
4346
Javadocs
47+
Jedis
4448
ListPosition
4549
Ludovico
4650
Magnocavallo
@@ -59,6 +63,7 @@ POJOs
5963
PubSub
6064
Queable
6165
READONLY
66+
Reauthentication
6267
RediSearch
6368
RediSearchCommands
6469
RedisBloom

.github/workflows/core_integration.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
java-version: '8'
3636
distribution: 'temurin'
3737
- name: Cache dependencies
38-
uses: actions/cache@v2
38+
uses: actions/cache@v4
3939
with:
4040
path: |
4141
~/.m2/repository

.github/workflows/core_snapshot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
server-username: MAVEN_USERNAME
2929
server-password: MAVEN_PASSWORD
3030
- name: Cache dependencies
31-
uses: actions/cache@v2
31+
uses: actions/cache@v4
3232
with:
3333
path: |
3434
~/.m2/repository

.github/workflows/entraid_integration.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
java-version: '8'
3535
distribution: 'temurin'
3636
- name: Cache dependencies
37-
uses: actions/cache@v2
37+
uses: actions/cache@v4
3838
with:
3939
path: |
4040
~/.m2/repository
@@ -64,3 +64,4 @@ jobs:
6464
AZURE_CERT: ${{secrets.AZURE_CERT}}
6565
AZURE_PRIVATE_KEY: ${{secrets.AZURE_PRIVATE_KEY}}
6666
AZURE_REDIS_SCOPES: ${{secrets.AZURE_REDIS_SCOPES}}
67+
AZURE_TENANT_ID: ${{secrets.AZURE_TENANT_ID}}

.github/workflows/entraid_snapshot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
server-username: MAVEN_USERNAME
3030
server-password: MAVEN_PASSWORD
3131
- name: Cache dependencies
32-
uses: actions/cache@v2
32+
uses: actions/cache@v4
3333
with:
3434
path: |
3535
~/.m2/repository

README.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Token-based Authentication Providers for Redis Java clients
2+
3+
This extension provides Token-based Authentication for Redis Java client libraries: [lettuce](https://github.com/redis/lettuce) and [Jedis](https://github.com/redis/jedis)
4+
5+
## Microsoft Entra ID provider
6+
7+
### Installation
8+
To install the Entra ID provider, add the following dependencies to your `pom.xml` file if you're using Maven:
9+
```xml
10+
<dependency>
11+
<groupId>redis.clients.authentication</groupId>
12+
<artifactId>redis-authx-entraid</artifactId>
13+
<version>0.1.1-beta1</version>
14+
</dependency>
15+
```
16+
If you're using Gradle, add the following dependencies to your `build.gradle` file:
17+
18+
```
19+
implementation 'redis.clients.authentication:redis-authx-entraid:0.1.1-beta1'
20+
```
21+
22+
### Quick Start
23+
Basic usage would look like this:
24+
```java
25+
TokenAuthConfig tokenAuthConfig = EntraIDTokenAuthConfigBuilder.builder()
26+
.clientId("YOUR_CLIENT_ID").secret("YOUR_SECRET")
27+
.authority("YOUR_AUTHORITY").scopes("SCOPES").build();
28+
```
29+
With the `tokenAuthConfig` provided, both Jedis and Lettuce clients can automatically handle Reauthentication with EntraID.
30+
31+
Refer to the [test files](https://github.com/redis/tbd-auth-entraid/tree/main/entraid/src/test/java/redis/clients/authentication) for more examples and detailed usage.

core/src/main/java/redis/clients/authentication/core/Dispatcher.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
/*
2-
* Copyright 2024, Redis Ltd. and Contributors All rights reserved. Licensed under the MIT License.
2+
* Copyright 2024, Redis Ltd. and Contributors
3+
* All rights reserved.
4+
*
5+
* Licensed under the MIT License.
36
*/
47
package redis.clients.authentication.core;
58

core/src/main/java/redis/clients/authentication/core/RenewalScheduler.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
/*
2-
* Copyright 2024, Redis Ltd. and Contributors All rights reserved. Licensed under the MIT License.
2+
* Copyright 2024, Redis Ltd. and Contributors
3+
* All rights reserved.
4+
*
5+
* Licensed under the MIT License.
36
*/
47
package redis.clients.authentication.core;
58

core/src/main/java/redis/clients/authentication/core/TokenManager.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
/*
2-
* Copyright 2024, Redis Ltd. and Contributors All rights reserved. Licensed under the MIT License.
2+
* Copyright 2024, Redis Ltd. and Contributors
3+
* All rights reserved.
4+
*
5+
* Licensed under the MIT License.
36
*/
47
package redis.clients.authentication.core;
58

entraid/pom.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,11 @@
6767
<artifactId>msal4j</artifactId>
6868
<version>1.17.2</version>
6969
</dependency>
70+
<dependency>
71+
<groupId>com.azure</groupId>
72+
<artifactId>azure-identity</artifactId>
73+
<version>1.15.3</version>
74+
</dependency>
7075
<dependency>
7176
<groupId>junit</groupId>
7277
<artifactId>junit</artifactId>

0 commit comments

Comments
 (0)