Skip to content

Commit c204752

Browse files
authored
Merge pull request #278 from weaviate/feat/dynamic-user-management
feat: support dynamic user management in Weaviate 1.30
2 parents ef70fc2 + a140c53 commit c204752

File tree

15 files changed

+888
-56
lines changed

15 files changed

+888
-56
lines changed

.github/workflows/main.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ env:
1818
concurrency:
1919
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
2020
cancel-in-progress: true
21-
21+
2222
jobs:
2323
checks:
2424
runs-on: ubuntu-latest
@@ -139,4 +139,4 @@ jobs:
139139
uses: softprops/action-gh-release@v1
140140
with:
141141
generate_release_notes: true
142-
draft: true
142+
draft: true

ci/compose.sh

100644100755
File mode changed.

ci/docker-compose-rbac.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,10 @@ services:
2828
AUTHORIZATION_RBAC_ENABLED: "true"
2929
AUTHORIZATION_ADMIN_USERS: "admin-user"
3030
AUTHORIZATION_VIEWER_USERS: "viewer-user"
31+
AUTHENTICATION_DB_USERS_ENABLED: "true"
32+
AUTHENTICATION_OIDC_ENABLED: "true"
33+
AUTHENTICATION_OIDC_CLIENT_ID: "wcs"
34+
AUTHENTICATION_OIDC_ISSUER: "https://auth.wcs.api.weaviate.io/auth/realms/SeMI"
35+
AUTHENTICATION_OIDC_USERNAME_CLAIM: "email"
36+
AUTHENTICATION_OIDC_GROUPS_CLAIM: "groups"
3137
...

src/collections/backup/unit.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,8 @@ describe('Mock testing of backup cancellation', () => {
109109
let mock: CancelMock;
110110

111111
beforeAll(async () => {
112-
mock = await CancelMock.use('1.27.0', 8958, 8959);
113-
client = await weaviate.connectToLocal({ port: 8958, grpcPort: 8959 });
112+
mock = await CancelMock.use('1.27.0', 8912, 8913);
113+
client = await weaviate.connectToLocal({ port: 8912, grpcPort: 8913 });
114114
});
115115

116116
it('should throw while waiting for creation if backup is cancelled in the meantime', async () => {
@@ -133,7 +133,7 @@ describe('Mock testing of backup cancellation', () => {
133133
});
134134

135135
it('should return false if creation backup does not exist', async () => {
136-
const success = await client.backup.cancel({ backupId: `${BACKUP_ID}4`, backend: BACKEND });
136+
const success = await client.backup.cancel({ backupId: `${BACKUP_ID}-unknown`, backend: BACKEND });
137137
expect(success).toBe(false);
138138
});
139139

src/connection/http.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -115,11 +115,9 @@ export default class ConnectionREST {
115115

116116
postReturn = <B, T>(path: string, payload: B): Promise<T> => {
117117
if (this.authEnabled) {
118-
return this.login().then((token) =>
119-
this.http.post<B, T>(path, payload, true, token).then((res) => res as T)
120-
);
118+
return this.login().then((token) => this.http.post<B, T>(path, payload, true, token) as T);
121119
}
122-
return this.http.post<B, T>(path, payload, true, '').then((res) => res as T);
120+
return this.http.post<B, T>(path, payload, true, '') as Promise<T>;
123121
};
124122

125123
postEmpty = <B>(path: string, payload: B): Promise<void> => {

0 commit comments

Comments
 (0)