-
Notifications
You must be signed in to change notification settings - Fork 803
Merge 0.22 -> 0.23 #6178
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
Merge 0.22 -> 0.23 #6178
Conversation
Don't override api url
Co-authored-by: Arman Bilge <armanbilge@gmail.com>
Resolves http4s#6068 NonceKeeper is package-private, so there's no way to construct one, meaning there's no way to call `challenge`. Mirror the same parameters from `apply`, and maintain the previous `challenge` method for bincompat.
…ion/DigestAuth.scala Co-authored-by: Arman Bilge <armanbilge@gmail.com>
In order to achieve the goal of F.delay(new NonceKeeper) but maintaining the original intent of `apply`, just revert everything in this PR, make the original (unusable) `challenge` `private`, and create a new public `challenge` with the necessary parameters, intended for human use, without impacting the existing flow.
…ion/DigestAuth.scala Co-authored-by: Arman Bilge <armanbilge@gmail.com>
Internals unchanged, in preparation for a pure rewrite of DigestAuth. Includes a private bincompat method
Internals unchanged, in preparation for a pure rewrite of DigestAuth. Includes a private bincompat method
server/shared/src/main/scala/org/http4s/server/middleware/authentication/NonceF.scala
Outdated
Show resolved
Hide resolved
Whoopsies: typelevel/cats-effect#2902 |
server/shared/src/main/scala/org/http4s/server/middleware/authentication/Nonce.scala
Outdated
Show resolved
Hide resolved
…ion/Nonce.scala Co-authored-by: Daniel Esik <e.danicheg@yandex.ru>
…entication/Nonce.scala Co-authored-by: Daniel Esik <e.danicheg@yandex.ru>
…ladoc Clean up `BlazeServerBuilder` scaladoc
current <- F.monotonic | ||
lastCleanupMillis <- Ref[F].of(current) | ||
nonces = new LinkedHashMap[String, NonceF[F]] | ||
random <- Random.javaSecuritySecureRandom[F] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see in CE3 this is implemented as:
def javaSecuritySecureRandom[F[_]: Sync]: F[Random[F]] =
Sync[F].delay(new java.security.SecureRandom).flatMap(r => javaUtilRandom(r))
We can do the same thing and unblock JS:
def javaSecuritySecureRandom[F[_]: Sync]: F[Random[F]] =
Sync[F].delay(new org.http4s.crypto.unsafe.SecureRandom).flatMap(r => javaUtilRandom(r))
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is now fixed in CE, so we can revert.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops. I didn't remember making 6753dd0 part of this. But it's a tight spot either way:
- If we do it, we want a consensus on
cats.effect.std.SecureRandom
before we release. - If we don't do it, we can't easily introduce
Random
to the API later without another crap overload.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm going to prune that commit because there's a discussion of it on another draft.
Integrate Random into DigestAuth
@@ -329,4 +330,13 @@ package object internal { | |||
} | |||
} | |||
} | |||
|
|||
private[http4s] def javaMajorVersion[F[_]](implicit F: Sync[F]): F[Option[Int]] = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems unused. Do we want this within 0.23
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's used in 0.22. Something like it will need to be in Cats-Effect if we fix its Random. I left it mainly because I don't want to write it again if we ever need it, but it wasn't hard. I guess we can prune it.
…-03-23 Merge 0.22 -> 0.23
…-03-23 Merge 0.22 -> 0.23
The heavy lift on this one is getting the new DigestAuth to CE3.
It still has the blocking Random embedded. We'll need to adjust this further in light of #6177.