Skip to content

UID2-1983 ensure first key in a keyset is immediately active#278

Merged
jon8787 merged 2 commits intomainfrom
jon-UID2-1983-fix-sharing-permissions-first-24-hours
May 31, 2024
Merged

UID2-1983 ensure first key in a keyset is immediately active#278
jon8787 merged 2 commits intomainfrom
jon-UID2-1983-fix-sharing-permissions-first-24-hours

Conversation

@jon8787
Copy link
Contributor

@jon8787 jon8787 commented May 30, 2024

No description provided.

@jon8787 jon8787 requested review from caroline-ttd and sunnywu May 30, 2024 09:03
}

@Test
void whenAddSecondKeyForKeysetItIsNotImmediatelyActive() throws Exception {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit pick, do we want to have one test case that when isDuringRotation is true?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are lots of existing rotation checks below. These call checkRotatedKeyResponse which ensures activates has the correct timestamp.

@caroline-ttd
Copy link
Contributor

caroline-ttd commented May 30, 2024

LGTM.

setKeysetKeys(MAX_KEY_ID, keys);

final KeysetKey key2 = keyService.addKeysetKey(keysetId);
assertTrue(key2.getActivates().isAfter(key2.getCreated()));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we check if activates is after created but within certain expected time limit?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I fixed the test to be more specific

@jon8787 jon8787 merged commit 5b81242 into main May 31, 2024
@jon8787 jon8787 deleted the jon-UID2-1983-fix-sharing-permissions-first-24-hours branch May 31, 2024 03:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants