Skip to content

bootstraponline/grpc_java_auth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gRPC Java Auth examples

echo.proto is from grpc-swift

generate certs using ./soseedygrpc/openssl/key.sh

  • Install JetBrains Toolbox
  • Install IntelliJ IDEA Community
  • Open build.gradle
  • Run the server and clients from the IDE
    • mutual_auth/MutualAuthServerTls.kt
    • mutual_auth/MutualAuthClientTls.kt
    • regular_tls/ServerTls.kt
    • regular_tls/ClientTls.kt
    • token_auth/TokenAuthServer.kt
    • token_auth/TokenAuthClient.kt
    • plaintext/ClientPlain.kt
    • plaintext/ServerPlain.kt
  • cd JavaAuthSwift; pod install
  • open JavaAuth.xcworkspace
  • run JavaAuthTests

failed to bind

  • killall -9 java

connect refused

Update /etc/hosts with 127.0.0.1 example.com The cert generation script is tied to the example.com hostname.

errors

Caused by: javax.net.ssl.SSLHandshakeException: error:10000410:SSL routines:OPENSSL_internal:SSLV3_ALERT_HANDSHAKE_FAILURE

Java client hostname wrong. Fix by updating CLIENT_CN="localhost" to CLIENT_CN="example.com"

ca subject must be "/CN=${SERVER_CN}" and not "/C=US/ST=Foo/L=Bar/O=Baz/CN=Xyz"

SwiftGRPC.RPCError.callError(successful, status unavailable: Connect Failed

Swift client hostname wrong. Fix by updating CLIENT_CN="example.com" to CLIENT_CN="localhost"

key generation

Use soseedygrpc/openssl/cfssl.sh to generate the keys.

The CN value must match on ca and client. The server may have a different CN.

About

Proof of concepts for gRPC Java authentication methods

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •