Skip to content

Commit a2be250

Browse files
authored
Auth refactoring (#903)
* Added scalecube-security-vault * Enhanced Secured annotation with roles and permissions attributes * Removed ConnectionSetup * Updated Principal * Fixed Reflect * Fixed Principal * Enhanced RequestContext * Cleanup * Added javadocs * Fixed StaticAddressRouter * Moved ServiceMethodDefinition to different package * Added ServiceRolesProcessor * Added RequestContext.deferSecured() * Moved PrincipalMapper, CredentialsSupplier, Authenticator to ".auth" package * Moved ServicePrincipal to "io.scalecube.services.auth" * Added NPEs checks to services-security module * Cosmetic change in ServiceMethodInvoker * Cosmetic changes, smarter logging for Principal.NULL_PRINCIPAL * Removed validation of message in ServiceMethodInvoker.toRequest() * Enhanced audit logging * Enhanced StaticAddressRouter * Changed signature of CredentialsSupplier, added more responsibility to ServiceTokenCredentialsSupplier * Added toString * Added CredentialsSuppliers * Moved annotation `@Secured` to service level, added new attribute `deferSecured: true (default)`, enhanced SMI -> now it looks after deferSecured flag * Removed strange toForbiddenException * Set scalecube-security -> 1.1.1
1 parent 759c306 commit a2be250

File tree

131 files changed

+4113
-3152
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

131 files changed

+4113
-3152
lines changed

pom.xml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
2+
<project xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
35
<modelVersion>4.0.0</modelVersion>
46

57
<parent>
@@ -58,7 +60,7 @@
5860

5961
<properties>
6062
<scalecube-cluster.version>2.7.1</scalecube-cluster.version>
61-
<scalecube-security.version>1.1.0</scalecube-security.version>
63+
<scalecube-security.version>1.1.1</scalecube-security.version>
6264

6365
<reactor.version>2020.0.32</reactor.version>
6466
<jackson.version>2.18.2</jackson.version>
@@ -71,6 +73,8 @@
7173
<junit-jupiter.version>5.8.2</junit-jupiter.version>
7274
<hamcrest.version>1.3</hamcrest.version>
7375
<log4j.version>2.17.2</log4j.version>
76+
<vault-java-driver.version>5.1.0</vault-java-driver.version>
77+
<testcontainers.version>1.20.4</testcontainers.version>
7478

7579
<distributionManagement.url>https://maven.pkg.github.com/scalecube/scalecube-services
7680
</distributionManagement.url>
@@ -90,14 +94,19 @@
9094

9195
<dependencyManagement>
9296
<dependencies>
93-
<!-- Scalecube security tokens -->
97+
<!-- Scalecube-Security -->
9498
<dependency>
9599
<groupId>io.scalecube</groupId>
96100
<artifactId>scalecube-security-tokens</artifactId>
97101
<version>${scalecube-security.version}</version>
98102
</dependency>
103+
<dependency>
104+
<groupId>io.scalecube</groupId>
105+
<artifactId>scalecube-security-vault</artifactId>
106+
<version>${scalecube-security.version}</version>
107+
</dependency>
99108

100-
<!-- Scalecube cluster -->
109+
<!-- Scalecube-Cluster -->
101110
<dependency>
102111
<groupId>io.scalecube</groupId>
103112
<artifactId>scalecube-cluster</artifactId>

services-api/pom.xml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
2+
<project xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
35

46
<modelVersion>4.0.0</modelVersion>
57

@@ -20,6 +22,13 @@
2022
<groupId>org.slf4j</groupId>
2123
<artifactId>slf4j-api</artifactId>
2224
</dependency>
25+
<!-- Tests -->
26+
<dependency>
27+
<groupId>io.scalecube</groupId>
28+
<artifactId>scalecube-services-testlib</artifactId>
29+
<version>${project.version}</version>
30+
<scope>test</scope>
31+
</dependency>
2332
</dependencies>
2433

2534
</project>

0 commit comments

Comments
 (0)