Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

N21-2136 moin schule logout from svs #5317

Merged
merged 27 commits into from
Nov 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
71f4a57
N21-2136 save session token
GordonNicholasCap Oct 28, 2024
034ebcd
N21-2136 add end session endpoint to oauthConfig of moin.schule
GordonNicholasCap Oct 29, 2024
706a392
N21-2136 wip new external system logout endpoint
GordonNicholasCap Oct 29, 2024
3720f01
Merge branch 'main' into N21-2136-moin-schule-logout-in-svs
GordonNicholasCap Oct 29, 2024
c8d7505
N21-2136 fix failing tests
GordonNicholasCap Oct 29, 2024
0762daa
Revert "N21-2136 save session token"
GordonNicholasCap Oct 29, 2024
2c6b7b4
N21-2136 adapted oauth session token
GordonNicholasCap Oct 30, 2024
be8d4ed
N21-2136 remove expired, invalid tokens
GordonNicholasCap Nov 2, 2024
e7a50c5
N21-2136 update auth service, error handling
GordonNicholasCap Nov 3, 2024
8cc7a3c
N21-2136 fix test
GordonNicholasCap Nov 4, 2024
7b68b0a
Merge branch 'main' into N21-2136-moin-schule-logout-in-svs
GordonNicholasCap Nov 4, 2024
118d4c0
N21-2136 integration test & code coverage
GordonNicholasCap Nov 7, 2024
c533381
Merge branch 'refs/heads/main' into N21-2136-moin-schule-logout-in-svs
GordonNicholasCap Nov 7, 2024
a086f59
Merge branch 'main' into N21-2136-moin-schule-logout-in-svs
GordonNicholasCap Nov 7, 2024
dbc7966
N21-2136 fix test
GordonNicholasCap Nov 7, 2024
0c08145
N21-2136 fix test module
GordonNicholasCap Nov 7, 2024
d55382c
N21-2136 feature flag, adjust loggables
GordonNicholasCap Nov 7, 2024
6cdedd0
Merge branch 'main' into N21-2136-moin-schule-logout-in-svs
GordonNicholasCap Nov 7, 2024
66a963c
N21-2136 fix config test
GordonNicholasCap Nov 8, 2024
6c9c8b4
Merge branch 'main' into N21-2136-moin-schule-logout-in-svs
GordonNicholasCap Nov 8, 2024
11d0ec7
N21-2136 adjust logic, tests
GordonNicholasCap Nov 11, 2024
7359b6b
N21-2136 review changes
GordonNicholasCap Nov 11, 2024
e7ea748
Merge remote-tracking branch 'origin/N21-2136-moin-schule-logout-in-s…
GordonNicholasCap Nov 11, 2024
21e4b27
N21-2136 fix tests
GordonNicholasCap Nov 11, 2024
750e917
Merge branch 'main' into N21-2136-moin-schule-logout-in-svs
GordonNicholasCap Nov 11, 2024
c796bb2
N21-2136 review changes
GordonNicholasCap Nov 11, 2024
24d6eea
Merge branch 'main' into N21-2136-moin-schule-logout-in-svs
GordonNicholasCap Nov 11, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,8 @@ data:
"authEndpoint": "https://auth.stage.niedersachsen-login.schule/realms/SANIS/protocol/openid-connect/auth",
"provider": "sanis",
"jwksEndpoint": "https://auth.stage.niedersachsen-login.schule/realms/SANIS/protocol/openid-connect/certs",
"issuer": "https://auth.stage.niedersachsen-login.schule/realms/SANIS"
"issuer": "https://auth.stage.niedersachsen-login.schule/realms/SANIS",
"endSessionEndpoint": "https://auth.stage.niedersachsen-login.schule/realms/SANIS/protocol/openid-connect/logout",
}
}
);'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import { Module } from '@nestjs/common';
import { SystemModule } from '@modules/system';
import { OauthModule } from '@modules/oauth';
import { AuthenticationTestModule } from './authentication-test.module';
import { LoginController, LogoutController } from './controllers';
import { LoginUc, LogoutUc } from './uc';

// This module is for use in api tests of other apps than the core server.
@Module({
imports: [AuthenticationTestModule],
imports: [AuthenticationTestModule, SystemModule, OauthModule],
providers: [LoginUc, LogoutUc],
controllers: [LoginController, LogoutController],
})
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import { Module } from '@nestjs/common';
import { SystemModule } from '@modules/system';
import { OauthModule } from '@modules/oauth/oauth.module';
import { AuthenticationModule } from './authentication.module';
import { LoginController, LogoutController } from './controllers';
import { LoginUc, LogoutUc } from './uc';

@Module({
imports: [AuthenticationModule],
imports: [AuthenticationModule, SystemModule, OauthModule],
providers: [LoginUc, LogoutUc],
controllers: [LoginController, LogoutController],
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ export interface AuthenticationConfig extends AccountConfig {
JWT_EXTENDED_TIMEOUT_SECONDS: number;
SC_DOMAIN: string;
LOGIN_BLOCK_TIME: number;
FEATURE_EXTERNAL_SYSTEM_LOGOUT_ENABLED: boolean;
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@ import { Configuration } from '@hpi-schul-cloud/commons/lib';
import { AuthGuardModule, AuthGuardOptions } from '@infra/auth-guard';
import { CacheWrapperModule } from '@infra/cache';
import { IdentityManagementModule } from '@infra/identity-management';
import { EncryptionModule } from '@infra/encryption';
import { AccountModule } from '@modules/account';
import { OauthModule } from '@modules/oauth/oauth.module';
import { RoleModule } from '@modules/role';
import { SystemModule } from '@modules/system';
import { Module } from '@nestjs/common';
import { JwtModule } from '@nestjs/jwt';
import { PassportModule } from '@nestjs/passport';
import { HttpModule } from '@nestjs/axios';
import { LegacySchoolRepo, UserRepo } from '@shared/repo';
import { LoggerModule } from '@src/core/logger';
import { Algorithm, SignOptions } from 'jsonwebtoken';
Expand Down Expand Up @@ -59,6 +61,8 @@ const createJwtOptions = () => {
IdentityManagementModule,
CacheWrapperModule,
AuthGuardModule.register([AuthGuardOptions.JWT]),
HttpModule,
EncryptionModule,
],
providers: [
UserRepo,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import { CacheWrapperModule } from '@infra/cache';
import { EncryptionModule } from '@infra/encryption';
import { IdentityManagementModule } from '@infra/identity-management';
import { AccountModule } from '@modules/account';
import { OauthModule } from '@modules/oauth/oauth.module';
import { RoleModule } from '@modules/role';
import { SystemModule } from '@modules/system';
import { Module } from '@nestjs/common';
import { HttpModule } from '@nestjs/axios';
import { ConfigService } from '@nestjs/config';
import { JwtModule } from '@nestjs/jwt';
import { PassportModule } from '@nestjs/passport';
Expand Down Expand Up @@ -57,6 +59,8 @@ const createJwtOptions = (configService: ConfigService<AuthenticationConfig>) =>
RoleModule,
IdentityManagementModule,
CacheWrapperModule,
HttpModule,
EncryptionModule,
],
providers: [
UserRepo,
Expand Down
Loading
Loading