MODLOGSAML-199: Remove legacy token support#196
Conversation
- Made useSecureTokens @deprecated and removed get and set to prevent re-serialization - Removed useSecureTokens from schema - Removed many _legacy tests - Forced /callback and /callback-with-expiry to return expiring tokens TODO - Remove legacy json data - Find all references to /token and remove
…llback isn't legacy anymore. Marking `useSecureTokens` as @JsonIgnore to fix DAO tests of new config and ensure that property is no longer persisted to db config.
| public void callbackEndpointTestDeprecatedUseSecureTokens() { | ||
| // Ensure that when the deprecated property useSecureTokens is present in the configuration, things | ||
| // still work as expected. | ||
| mock.setMockContent("mock_content_callback.json"); |
There was a problem hiding this comment.
After using an new mock configuration,
here mock.setMockContent("mock_content_callback.json"); ,
it is necessary to use
dataMigrationHelper.dataMigrationCompleted(vertx, context, false);
to overwrite the data in the database.
Otherwise the data of
public void setUp(TestContext context)
are used.
| mock.setMockContent("mock_content_legacy.json"); | ||
| public void putConfigurationWithCallback() { | ||
| mock.setMockContent("mock_content_callback.json"); | ||
|
|
There was a problem hiding this comment.
After using an new mock configuration,
here mock.setMockContent("mock_content_callback.json"); ,
it is necessary to use
dataMigrationHelper.dataMigrationCompleted(vertx, context, false);
to overwrite the data in the database.
Otherwise the data of
public void setUp(TestContext context)
are used.
barbaraloehle
left a comment
There was a problem hiding this comment.
After using an new mock configuration in the class SamlAPITest
the method
dataMigrationHelper.dataMigrationCompleted(vertx, context, false);
has to be added to overwrite the data in the database.
This has further to be applied to the methods:
public void putConfiguration()
--> public void putConfiguration(context)
and
private void testCallbackErrorCases(String callbackUrl, String relayState, ???
String cookie) -->
private void testCallbackErrorCases(String callbackUrl, String relayState, ???
String cookie, TestContext context)
|
In the description of MODLOGSAML-199 the following is mentioned : |
|
1 similar comment
|




https://folio-org.atlassian.net/browse/MODLOGSAML-199
@DeprecatedtoSamlConfiguration.useSecureTokens./tokenendpoint./callbackand/callback-with-expirywhen called return expiring token cookies (they should already).useSecureTokensbecause we no longer need a boolean flag to determine if legacy tokens should be used on the/callbackendpoint (see MODLOGSAML-192 for background).IdpLegacyTestbecause it works only with the old tokens.mock_..._legacy.jsonin mock files to_callbacketc since/callbackisn't "legacy" or deprecated anymore.useSecureTokensin mocks since it is likely to be present for the time being in configuration.@JsonIgnoreto keep from being written./tokenendpoint in mocks but change response to 404.