Skip to content

Commit fb43f9f

Browse files
committed
Merge branch '7.8' of github.com:gchq/stroom
2 parents cd75424 + a382a75 commit fb43f9f

File tree

2 files changed

+25
-3
lines changed

2 files changed

+25
-3
lines changed

stroom-security/stroom-security-impl/src/main/java/stroom/security/impl/OpenIdManager.java

+1-3
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414

1515
import jakarta.inject.Inject;
1616
import jakarta.servlet.http.HttpServletRequest;
17-
import jakarta.servlet.http.HttpSession;
1817
import jakarta.ws.rs.core.UriBuilder;
1918

2019
import java.util.List;
@@ -104,15 +103,14 @@ private String backChannelOIDC(final HttpServletRequest request,
104103
// If we have a state id then this should be a return from the auth service.
105104
LOGGER.debug(() -> LogUtil.message("We have the following backChannelOIDC state: {}", state));
106105

107-
final HttpSession session = request.getSession(false);
108106
UserAgentSessionUtil.set(request);
109107

110108
final Optional<UserIdentity> optionalUserIdentity =
111109
userIdentityFactory.getAuthFlowUserIdentity(request, code, state);
112110

113111
if (optionalUserIdentity.isPresent()) {
114112
// Set the token in the session.
115-
UserIdentitySessionUtil.set(session, optionalUserIdentity.get());
113+
UserIdentitySessionUtil.set(request, optionalUserIdentity.get());
116114
loggedIn = true;
117115
}
118116

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
* Issue **#4842** : Fix null session when doing OIDC code flow with KeyCloak.
2+
3+
4+
```sh
5+
# ********************************************************************************
6+
# Issue title: OIDC code flow is broken when using Keycloack IDP
7+
# Issue link: https://github.com/gchq/stroom/issues/4842
8+
# ********************************************************************************
9+
10+
# ONLY the top line will be included as a change entry in the CHANGELOG.
11+
# The entry should be in GitHub flavour markdown and should be written on a SINGLE
12+
# line with no hard breaks. You can have multiple change files for a single GitHub issue.
13+
# The entry should be written in the imperative mood, i.e. 'Fix nasty bug' rather than
14+
# 'Fixed nasty bug'.
15+
#
16+
# Examples of acceptable entries are:
17+
#
18+
#
19+
# * Issue **123** : Fix bug with an associated GitHub issue in this repository
20+
#
21+
# * Issue **namespace/other-repo#456** : Fix bug with an associated GitHub issue in another repository
22+
#
23+
# * Fix bug with no associated GitHub issue.
24+
```

0 commit comments

Comments
 (0)