IdentityServer4 icon indicating copy to clipboard operation
IdentityServer4 copied to clipboard

Make InputLengthRestrictions.TokenHandle configurable

Open ssarj opened this issue 9 years ago • 6 comments

I see that InputLengthRestrictions.TokenHandle does not have a public setter, which I ran into when playing with a token generation scheme that was generating strings of length > 100.

Before making a PR, is there any desire:

  • to have this value configurable?
  • have reference token handles validated as they're generated (.. and so have an incorrect implementation detected earlier)?

ssarj avatar Aug 18 '17 01:08 ssarj

which I ran into when playing with a token generation scheme that was generating strings of length > 100.

How? IIRC we gen a 128 bit random number and put that into a base64url encoded string.

brockallen avatar Aug 18 '17 20:08 brockallen

Sorry, I really should have said "playing with a token handle generation scheme".

I've got my own implementation of IReferenceTokenStore that fully encapsulates reference token storage, and so does not depend on IHandleGenerationService / DefaultHandleGenerationService in any way.

ssarj avatar Aug 20 '17 22:08 ssarj

Hmm... well, we have to have some limits. We'll take a look.

brockallen avatar Aug 20 '17 23:08 brockallen

Absolutely agree that there needs to be a limit -- only question is could it be configurable by users of IdentityServer4.

ssarj avatar Aug 21 '17 03:08 ssarj

Done.

brockallen avatar Aug 31 '17 16:08 brockallen

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

lock[bot] avatar Jan 14 '20 06:01 lock[bot]