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

STCOR-869 do not store /logout as a "return-to" URL #1509

Closed
wants to merge 48 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
cfd20c2
Release v10.1.0 (#1441)
zburke Mar 13, 2024
33d2165
STCOR-769 Utilize the 'tenant' procured through the SSO login process…
usavkov-epam Mar 14, 2024
66d475c
Release v10.1.1 (#1447)
zburke Mar 25, 2024
2b7c593
leverage keycloak (authn) and kong (discovery) endpoints
zburke Dec 8, 2023
1689d2c
test cleanup
zburke Dec 13, 2023
5db0de9
backwards compatibility with non-keycloak environments
zburke Dec 14, 2023
b40bd16
lint cleanup, console.log cleanup
zburke Dec 14, 2023
7bb9e1c
Add back button support to multi-tenant workflow (#1381)
ryandberger Dec 22, 2023
d8c39d7
STCOR-773 show legacy or application-based discovery info (#1385)
zburke Jan 4, 2024
b31c934
Graceful handling when provides array is null in API response (#1388)
ryandberger Jan 10, 2024
bb47876
STCOR-790: check parsed client id, if undefined use clientId defined …
aidynoJ Jan 15, 2024
0c0480c
STCOR-795 optionally use users-keycloak endpoint for password reset (…
zburke Jan 22, 2024
72d89d4
STCOR-794: Disable Continue button when no tenant selected (#1400)
ryandberger Jan 22, 2024
5a42507
STCOR-796 replace x-okapi-token credentials with RTR and cookies (#1410)
zburke Jan 31, 2024
f158353
Add opt-in "Really logout?" stripes.config.js option (#1420)
ryandberger Feb 13, 2024
d4e1cb2
STCOR-798 Add Jest tests for SSO Landing - remove BTOG tests for the …
zburke Feb 14, 2024
4067e9f
STCOR-811 parse /authn/token response for AT/RT expirations (#1417)
zburke Feb 14, 2024
ca50761
STCOR-812 include X-Okapi-Tenant header in /authn/logout requests (#1…
zburke Feb 14, 2024
3711eb0
STCOR-813 correctly parse .../_self permissions (#1421)
zburke Feb 14, 2024
4013ed0
STCOR-770: Export getEventHandler to be able to create events in othe…
zburke Feb 14, 2024
11788fa
STCOR-810 cleanup deprecated entitlement params (#1418)
zburke Feb 16, 2024
ab80575
[STCOR-803] Simplify logout workflow to bypass keycloak confirmation …
ryandberger Feb 16, 2024
0adf680
Revert "STCOR-810 cleanup deprecated entitlement params (#1418)" (#1427)
zburke Feb 18, 2024
f6feedc
STCOR-810 CORRECTLY clean up deprecated entitlement params (#1429)
zburke Feb 19, 2024
431f0c3
STCOR-816 only fetch /saml/check when login-saml is present (#1432)
zburke Feb 26, 2024
ecf9429
STCOR-776 show "Keep working?" prompt when session ages (#1431)
zburke Feb 27, 2024
9d58e0c
Revert "STCOR-776 show "Keep working?" prompt when session ages (#143…
zburke Feb 29, 2024
22b3176
STCOR-821 Add `idName` and `limit` as passable props to `useChunkedCQ…
ryandberger Mar 6, 2024
6b37986
STCOR-789: Restore original URL on login (#1442)
aidynoJ Mar 18, 2024
2b786c6
STCOR-820 For the /reset-password route, allow token to be specified …
ryandberger Mar 22, 2024
25c345d
rebase cleanup: missed a few things along the way
zburke Mar 28, 2024
3fef2ba
STCOR-789-follow-up: Include /authn/token on the list of always-permi…
aidynoJ Apr 9, 2024
80a4435
STCOR-776 show "Keep working?" prompt then terminate sessions due to …
zburke May 15, 2024
b5fe814
STCOR-776 use correct logout-timeout translation IDs (#1473)
zburke May 17, 2024
01f7ee2
STCOR-776 always populate stripes.config.rtr.activityEvents (#1483)
zburke May 28, 2024
e2b6a09
STCOR-776 optionally schedule RTR based on session data (#1488)
zburke Jun 10, 2024
d15fe3a
rebase-cleanup: the STCOR-776 rebase was a doozy
zburke May 17, 2024
adcf437
rebase-cleanup: restore logout
zburke May 20, 2024
17d3f7f
rebase-cleanup: restore logout AND ITS TESTS (#1479)
zburke May 23, 2024
b17e9ad
STCOR-776 RTR adjustments for keycloak (#1490)
zburke Jun 11, 2024
2d712ea
[STCOR-787] Always retrieve clientId and tenant values from config.te…
ryandberger Jun 10, 2024
df755ea
STCOR-787 Fix tenant and clientId references (#1492)
ryandberger Jun 24, 2024
dede048
STCOR-864 correctly evaluate typeof stripes.okapi (#1498)
zburke Jun 25, 2024
aa9b1d3
STCOR-865 call logout() exclusively from logout-* routes (#1500)
zburke Jul 8, 2024
3cc5d04
STCOR-866 include `/users-keycloak/_self` in auth-n requests (#1502)
zburke Jul 16, 2024
9a7b8d4
STCOR-862 terminate session when fixed-length session expires (#1503)
zburke Jul 22, 2024
8ef05ce
STCOR-868 IST/FLST backport cleanup
zburke Dec 8, 2023
319259c
STCOR-869 do not store /logout as a "return-to" URL
zburke Jul 25, 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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ artifacts
dist
junit.xml
.vscode/launch.json
.idea
41 changes: 40 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
# Change history for stripes-core

## 10.1.0 IN PROGRESS
## [10.1.1](https://github.com/folio-org/stripes-core/tree/v10.1.1) (2024-03-25)
[Full Changelog](https://github.com/folio-org/stripes-core/compare/v10.1.0...v10.1.1)

* Use keycloak URLs in place of users-bl for tenant-switch. Refs US1153537.
* Idle-session timeout and "Keep working?" modal. Refs STCOR-776.
* Always retrieve `clientId` and `tenant` values from `config.tenantOptions` in stripes.config.js. Retires `okapi.tenant`, `okapi.clientId`, and `config.isSingleTenant`. Refs STCOR-787.
* Correctly evaluate `stripes.okapi` before rendering `<RootWithIntl>`. Refs STCOR-864.
* `/users-keycloak/_self` is an authentication request. Refs STCOR-866.
* Terminate the session when the fixed-length session expires. Refs STCOR-862.

## [10.1.0](https://github.com/folio-org/stripes-core/tree/v10.1.0) (2024-03-12)
[Full Changelog](https://github.com/folio-org/stripes-core/compare/v10.0.0...v10.1.0)

* Provide optional tenant argument to `useOkapiKy` hook. Refs STCOR-747.
* Avoid private path when import `validateUser` function. Refs STCOR-749.
Expand All @@ -24,6 +35,34 @@
* Add `idName` and `limit` as passable props to `useChunkedCQLFetch`. Refs STCOR-821.
* Check for valid token before rotating during XHR send. Refs STCOR-817.
* Remove `autoComplete` from `<ForgotPassword>`, `<ForgotUsername>` fields. Refs STCOR-742.
* Use keycloak URLs in place of users-bl for tenant-switch. Refs US1153537.

## [10.0.3](https://github.com/folio-org/stripes-core/tree/v10.0.3) (2023-11-10)
[Full Changelog](https://github.com/folio-org/stripes-core/compare/v10.0.2...v10.0.3)

* Revert "Use cookies and RTR" until further notice. Refs FOLIO-3627.
* Ensure `<AppIcon>` is not cut off when app name is long. Refs STCOR-752.

## [10.0.2](https://github.com/folio-org/stripes-core/tree/v10.0.2) (2023-11-06)
[Full Changelog](https://github.com/folio-org/stripes-core/compare/v10.0.1...v10.0.2)

* Use cookies and RTR instead of directly handling the JWT. Refs STCOR-671, STCOR-754, STCOR-756, FOLIO-3627.

## [10.0.1](https://github.com/folio-org/stripes-core/tree/v10.0.1) (2023-10-25)
[Full Changelog](https://github.com/folio-org/stripes-core/compare/v10.0.0...v10.0.1)

* Export `validateUser`. Refs STCOR-749.
* Opt-in: handle access-control via cookies. Refs STCOR-671.
* Opt-in: disable login when cookies are disabled. Refs STCOR-762.
* Convert `<SSOLanding />` tests to jest. STCOR-798.
* Parse response from `/authn/token` to immediately store AT/RT expiration values. Refs STCOR-811.
* Include `X-Okapi-Tenant` header in `/authn/logout` calls. Refs STCOR-812.
* Correctly parse `.../_self` permissions object. Refs STCOR-813.
* Export `getEventHandler` to be able to create events in other modules. Refs STCOR-770.
* Simplify logout workflow to bypass keycloak confirmation page. Refs STCOR-803.
* After login, only check SSO endpoints when `login-saml` interface is present. Refs STCOR-816.
* Add `idName` and `limit` as passable props to `useChunkedCQLFetch`. Refs STCOR-821.
* For the `/reset-password` route, allow token to be specified in the path or query arguments. Refs STCOR-820.

## [10.0.0](https://github.com/folio-org/stripes-core/tree/v10.0.0) (2023-10-11)
[Full Changelog](https://github.com/folio-org/stripes-core/compare/v9.0.0...v10.0.0)
Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@folio/stripes-core",
"version": "10.1.0",
"version": "10.1.1",
"description": "The starting point for Stripes applications",
"license": "Apache-2.0",
"repository": "folio-org/stripes-core",
Expand Down Expand Up @@ -75,11 +75,13 @@
"graphql": "^16.0.0",
"history": "^4.6.3",
"hoist-non-react-statics": "^3.3.0",
"inactivity-timer": "^1.0.0",
"jwt-decode": "^3.1.2",
"ky": "^0.23.0",
"localforage": "^1.5.6",
"lodash": "^4.17.21",
"moment-timezone": "^0.5.14",
"ms": "^2.1.3",
"prop-types": "^15.5.10",
"query-string": "^7.1.2",
"react-cookie": "^4.0.3",
Expand Down
7 changes: 5 additions & 2 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,11 @@ export default class StripesCore extends Component {
constructor(props) {
super(props);

const storedTenant = localStorage.getItem('tenant');
const parsedTenant = storedTenant ? JSON.parse(storedTenant) : undefined;

const okapi = (typeof okapiConfig === 'object' && Object.keys(okapiConfig).length > 0)
? okapiConfig : { withoutOkapi: true };
? { ...okapiConfig, tenant: parsedTenant?.tenantName || okapiConfig.tenant, clientId: parsedTenant?.clientId } : { withoutOkapi: true };

const initialState = merge({}, { okapi }, props.initialState);

Expand All @@ -48,7 +51,7 @@ export default class StripesCore extends Component {
logger={this.logger}
config={config}
actionNames={this.actionNames}
disableAuth={(config && config.disableAuth) || false}
disableAuth={(config?.disableAuth) || false}
{...props}
/>
);
Expand Down
Loading
Loading