Merge pull request #16530 from skrauchenia/fix/16330-akka-util-Crypt-deprecate-skrauchenia
=act #16330 deprecating akka.util.Crypt
This commit is contained in:
commit
c56d670c03
6 changed files with 9 additions and 47 deletions
|
|
@ -5,7 +5,7 @@
|
||||||
package akka.util
|
package akka.util
|
||||||
|
|
||||||
import java.security.{ MessageDigest, SecureRandom }
|
import java.security.{ MessageDigest, SecureRandom }
|
||||||
//FIXME DOCS
|
@deprecated(message = "Not in use.", since = "2.4-M1")
|
||||||
object Crypt {
|
object Crypt {
|
||||||
val hex = "0123456789ABCDEF"
|
val hex = "0123456789ABCDEF"
|
||||||
val lineSeparator = System.getProperty("line.separator")
|
val lineSeparator = System.getProperty("line.separator")
|
||||||
|
|
|
||||||
|
|
@ -444,27 +444,6 @@ untrusted mode when incoming via the remoting layer:
|
||||||
within the same JVM), you can restrict the messages on this interface by
|
within the same JVM), you can restrict the messages on this interface by
|
||||||
marking them :class:`PossiblyHarmful` so that a client cannot forge them.
|
marking them :class:`PossiblyHarmful` so that a client cannot forge them.
|
||||||
|
|
||||||
Secure Cookie Handshake
|
|
||||||
-----------------------
|
|
||||||
|
|
||||||
Akka remoting also allows you to specify a secure cookie that will be exchanged and ensured to be identical
|
|
||||||
in the connection handshake between the client and the server. If they are not identical then the client
|
|
||||||
will be refused to connect to the server.
|
|
||||||
|
|
||||||
The secure cookie can be any kind of string. But the recommended approach is to generate a cryptographically
|
|
||||||
secure cookie using this script ``$AKKA_HOME/scripts/generate_config_with_secure_cookie.sh`` or from code
|
|
||||||
using the ``akka.util.Crypt.generateSecureCookie()`` utility method.
|
|
||||||
|
|
||||||
You have to ensure that both the connecting client and the server have the same secure cookie as well
|
|
||||||
as the ``require-cookie`` option turned on.
|
|
||||||
|
|
||||||
Here is an example config::
|
|
||||||
|
|
||||||
akka.remote {
|
|
||||||
secure-cookie = "090A030E0F0A05010900000A0C0E0C0B03050D05"
|
|
||||||
require-cookie = on
|
|
||||||
}
|
|
||||||
|
|
||||||
SSL
|
SSL
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -160,4 +160,8 @@ In case you want to perserve the old behavior of providing the actor's path as t
|
||||||
implement it yourself either as a helper trait or simply by overriding ``persistenceId`` as follows::
|
implement it yourself either as a helper trait or simply by overriding ``persistenceId`` as follows::
|
||||||
|
|
||||||
override def persistenceId = self.path.toStringWithoutAddress
|
override def persistenceId = self.path.toStringWithoutAddress
|
||||||
|
Secure Cookies
|
||||||
|
==============
|
||||||
|
|
||||||
|
`Secure cookies` feature was deprecated.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -448,27 +448,6 @@ untrusted mode when incoming via the remoting layer:
|
||||||
within the same JVM), you can restrict the messages on this interface by
|
within the same JVM), you can restrict the messages on this interface by
|
||||||
marking them :class:`PossiblyHarmful` so that a client cannot forge them.
|
marking them :class:`PossiblyHarmful` so that a client cannot forge them.
|
||||||
|
|
||||||
Secure Cookie Handshake
|
|
||||||
-----------------------
|
|
||||||
|
|
||||||
Akka remoting also allows you to specify a secure cookie that will be exchanged and ensured to be identical
|
|
||||||
in the connection handshake between the client and the server. If they are not identical then the client
|
|
||||||
will be refused to connect to the server.
|
|
||||||
|
|
||||||
The secure cookie can be any kind of string. But the recommended approach is to generate a cryptographically
|
|
||||||
secure cookie using this script ``$AKKA_HOME/scripts/generate_config_with_secure_cookie.sh`` or from code
|
|
||||||
using the ``akka.util.Crypt.generateSecureCookie()`` utility method.
|
|
||||||
|
|
||||||
You have to ensure that both the connecting client and the server have the same secure cookie as well
|
|
||||||
as the ``require-cookie`` option turned on.
|
|
||||||
|
|
||||||
Here is an example config::
|
|
||||||
|
|
||||||
akka.remote {
|
|
||||||
secure-cookie = "090A030E0F0A05010900000A0C0E0C0B03050D05"
|
|
||||||
require-cookie = on
|
|
||||||
}
|
|
||||||
|
|
||||||
SSL
|
SSL
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
echo "Warning: Please note that this feature deprecated since 2.4-M1"
|
||||||
exec scala "$0" "$@"
|
exec scala "$0" "$@"
|
||||||
!#
|
!#
|
||||||
|
|
||||||
|
|
@ -44,6 +45,7 @@ object Crypt {
|
||||||
print("""
|
print("""
|
||||||
akka {
|
akka {
|
||||||
remote {
|
remote {
|
||||||
|
// secure cookies was deprecated
|
||||||
secure-cookie = "%s"
|
secure-cookie = "%s"
|
||||||
require-cookie = on
|
require-cookie = on
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -111,9 +111,7 @@ akka {
|
||||||
# message contains a mismatching cookie or the cookie is missing.
|
# message contains a mismatching cookie or the cookie is missing.
|
||||||
require-cookie = off
|
require-cookie = off
|
||||||
|
|
||||||
# Generate your own with the script availbale in
|
# Deprecated since 2.4-M1
|
||||||
# '$AKKA_HOME/scripts/generate_config_with_secure_cookie.sh' or using
|
|
||||||
# 'akka.util.Crypt.generateSecureCookie'
|
|
||||||
secure-cookie = ""
|
secure-cookie = ""
|
||||||
|
|
||||||
### Logging
|
### Logging
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue