Skip to content
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

Add support for Spring-Security/Authentication #122

Merged
merged 6 commits into from
Nov 10, 2018

Conversation

ST-DDT
Copy link
Collaborator

@ST-DDT ST-DDT commented Nov 7, 2018

Related: #49
Fixes: #50 , #69

  • Adds support for client authentication via certificates or basicAuth
  • Adds support for server side authentication via certificates or basicAuth
  • Adds support for service side authorization checks via Spring-Security's annotations or manual configuration
  • Documented these features in the README

@ST-DDT ST-DDT force-pushed the security branch 6 times, most recently from 3c06e1b to dbbc8fa Compare November 7, 2018 16:48
@ST-DDT
Copy link
Collaborator Author

ST-DDT commented Nov 7, 2018

@yidongnan I'm unable to see why the tests fail, they seem to fail randomly.
Strangely enough, it always works for me locally without any problems.
Is it possible to print the test failures to the CI logs? Or do you have a clue for me?

@ST-DDT ST-DDT force-pushed the security branch 3 times, most recently from e268dd0 to dbbc8fa Compare November 7, 2018 17:10
@ST-DDT
Copy link
Collaborator Author

ST-DDT commented Nov 8, 2018

It looks like it was a temporary travis issue.

Ready for review and merge.

@yidongnan yidongnan merged commit 95945db into grpc-ecosystem:master Nov 10, 2018
@ST-DDT ST-DDT deleted the security branch November 10, 2018 10:52
@yidongnan
Copy link
Collaborator

@ST-DDT I executed the gradlew.bat :tests:test or gradlew.bat build locally, and there was a random failure.

PS D:\Code\grpc-spring-boot-starter> ./gradlew.bat build

> Configure project :
[versioning] WARNING - the working copy has unstaged or uncommitted changes.

> Task :tests:test

net.devh.test.grpc.security.ManualSecurityWithBasicAuthTest > testSecuredCall() FAILED
    java.util.concurrent.ExecutionException
        Caused by: io.grpc.StatusRuntimeException

22 tests completed, 1 failed

> Task :tests:test FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':tests:test'.
> There were failing tests. See the report at: file:///D:/Code/grpc-spring-boot-starter/tests/build/reports/tests/test/index.html

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0.
See https://docs.gradle.org/4.7/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 37s
38 actionable tasks: 11 executed, 27 up-to-date
java.util.concurrent.ExecutionException: io.grpc.StatusRuntimeException: UNKNOWN
	at com.google.common.util.concurrent.AbstractFuture.getDoneValue(AbstractFuture.java:500)
	at com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:479)
	at net.devh.test.grpc.security.AbstractSecurityTest.testSecuredCall(AbstractSecurityTest.java:118)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:515)
	at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:115)
	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeTestMethod$6(TestMethodTestDescriptor.java:171)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:72)
	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeTestMethod(TestMethodTestDescriptor.java:167)
	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:114)
	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:59)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:105)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:72)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:95)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:71)
	at java.util.ArrayList.forEach(ArrayList.java:1257)
	at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:38)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:110)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:72)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:95)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:71)
	at java.util.ArrayList.forEach(ArrayList.java:1257)
	at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:38)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:110)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:72)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:95)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:71)
	at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:32)
	at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57)
	at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:51)
	at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:170)
	at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:154)
	at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:90)
	at org.gradle.api.internal.tasks.testing.junitplatform.JUnitPlatformTestClassProcessor$CollectAllTestClassesExecutor.processAllTestClasses(JUnitPlatformTestClassProcessor.java:92)
	at org.gradle.api.internal.tasks.testing.junitplatform.JUnitPlatformTestClassProcessor$CollectAllTestClassesExecutor.access$100(JUnitPlatformTestClassProcessor.java:77)
	at org.gradle.api.internal.tasks.testing.junitplatform.JUnitPlatformTestClassProcessor.stop(JUnitPlatformTestClassProcessor.java:73)
	at org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.stop(SuiteTestClassProcessor.java:61)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35)
	at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
	at org.gradle.internal.dispatch.ContextClassLoaderDispatch.dispatch(ContextClassLoaderDispatch.java:32)
	at org.gradle.internal.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:93)
	at com.sun.proxy.$Proxy1.stop(Unknown Source)
	at org.gradle.api.internal.tasks.testing.worker.TestWorker.stop(TestWorker.java:123)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35)
	at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
	at org.gradle.internal.remote.internal.hub.MessageHubBackedObjectConnection$DispatchWrapper.dispatch(MessageHubBackedObjectConnection.java:155)
	at org.gradle.internal.remote.internal.hub.MessageHubBackedObjectConnection$DispatchWrapper.dispatch(MessageHubBackedObjectConnection.java:137)
	at org.gradle.internal.remote.internal.hub.MessageHub$Handler.run(MessageHub.java:404)
	at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
	at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
	at java.lang.Thread.run(Thread.java:748)
Caused by: io.grpc.StatusRuntimeException: UNKNOWN
	at io.grpc.Status.asRuntimeException(Status.java:526)
	at io.grpc.stub.ClientCalls$UnaryStreamToFuture.onClose(ClientCalls.java:468)
	at io.grpc.PartialForwardingClientCallListener.onClose(PartialForwardingClientCallListener.java:39)
	at io.grpc.ForwardingClientCallListener.onClose(ForwardingClientCallListener.java:23)
	at io.grpc.ForwardingClientCallListener$SimpleForwardingClientCallListener.onClose(ForwardingClientCallListener.java:40)
	at io.grpc.internal.CensusStatsModule$StatsClientInterceptor$1$1.onClose(CensusStatsModule.java:684)
	at io.grpc.PartialForwardingClientCallListener.onClose(PartialForwardingClientCallListener.java:39)
	at io.grpc.ForwardingClientCallListener.onClose(ForwardingClientCallListener.java:23)
	at io.grpc.ForwardingClientCallListener$SimpleForwardingClientCallListener.onClose(ForwardingClientCallListener.java:40)
	at io.grpc.internal.CensusTracingModule$TracingClientInterceptor$1$1.onClose(CensusTracingModule.java:403)
	at io.grpc.internal.ClientCallImpl.closeObserver(ClientCallImpl.java:459)
	at io.grpc.internal.ClientCallImpl.access$300(ClientCallImpl.java:63)
	at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl.close(ClientCallImpl.java:546)
	at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl.access$600(ClientCallImpl.java:467)
	at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInContext(ClientCallImpl.java:584)
	at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37)
	at io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:123)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	... 1 more

@ST-DDT
Copy link
Collaborator Author

ST-DDT commented Nov 10, 2018

Can you include the logs?

@yidongnan
Copy link
Collaborator

20:40:04.267 [Test worker] INFO  o.s.t.c.s.AbstractContextLoader - Could not detect default resource locations for test class [net.devh.test.grpc.security.AnnotatedSecurityWithBasicAuthTest]: no resource found for suffixes {-context.xml, Context.groovy}.
20:40:04.271 [Test worker] INFO  o.s.b.t.c.SpringBootTestContextBootstrapper - Loaded default TestExecutionListener class names from location [META-INF/spring.factories]: [org.springframework.boot.test.autoconfigure.restdocs.RestDocsTestExecutionListener, org.springframework.boot.test.autoconfigure.web.client.MockRestServiceServerResetTestExecutionListener, org.springframework.boot.test.autoconfigure.web.servlet.MockMvcPrintOnlyOnFailureTestExecutionListener, org.springframework.boot.test.autoconfigure.web.servlet.WebDriverTestExecutionListener, org.springframework.boot.test.mock.mockito.MockitoTestExecutionListener, org.springframework.boot.test.mock.mockito.ResetMocksTestExecutionListener, org.springframework.test.context.web.ServletTestExecutionListener, org.springframework.test.context.support.DirtiesContextBeforeModesTestExecutionListener, org.springframework.test.context.support.DependencyInjectionTestExecutionListener, org.springframework.test.context.support.DirtiesContextTestExecutionListener, org.springframework.test.context.transaction.TransactionalTestExecutionListener, org.springframework.test.context.jdbc.SqlScriptsTestExecutionListener]
20:40:04.273 [Test worker] INFO  o.s.b.t.c.SpringBootTestContextBootstrapper - Using TestExecutionListeners: [org.springframework.test.context.support.DirtiesContextBeforeModesTestExecutionListener@3a3b0827, org.springframework.boot.test.mock.mockito.MockitoTestExecutionListener@7a44feed, org.springframework.boot.test.autoconfigure.SpringBootDependencyInjectionTestExecutionListener@65472afa, org.springframework.test.context.support.DirtiesContextTestExecutionListener@3460cda8, org.springframework.boot.test.autoconfigure.restdocs.RestDocsTestExecutionListener@56f89133, org.springframework.boot.test.autoconfigure.web.client.MockRestServiceServerResetTestExecutionListener@b16be97, org.springframework.boot.test.autoconfigure.web.servlet.MockMvcPrintOnlyOnFailureTestExecutionListener@57da55f5, org.springframework.boot.test.autoconfigure.web.servlet.WebDriverTestExecutionListener@6565cf2b, org.springframework.boot.test.mock.mockito.ResetMocksTestExecutionListener@7786bbbd]
20:40:04.274 [Test worker] INFO  n.d.t.g.s.AnnotatedSecurityWithBasicAuthTest - --- AnnotatedSecurityWithBasicAuthConfiguration ---

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::        (v2.0.4.RELEASE)

20:40:04.327 [Test worker] INFO  n.d.t.g.s.AnnotatedSecurityWithBasicAuthTest - Starting AnnotatedSecurityWithBasicAuthTest on Michael-PC with PID 8860 (started by Michael in D:\Code\grpc-spring-boot-starter\tests)
20:40:04.328 [Test worker] INFO  n.d.t.g.s.AnnotatedSecurityWithBasicAuthTest - No active profile set, falling back to default profiles: default
20:40:04.334 [Test worker] INFO  o.s.c.a.AnnotationConfigApplicationContext - Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@14a89320: startup date [Sat Nov 10 20:40:04 CST 2018]; root of context hierarchy
20:40:04.486 [Test worker] INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'net.devh.springboot.autoconfigure.grpc.client.GrpcClientAutoConfiguration' of type [net.devh.springboot.autoconfigure.grpc.client.GrpcClientAutoConfiguration$$EnhancerBySpringCGLIB$$d2536603] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
20:40:04.504 [Test worker] INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'org.springframework.security.config.annotation.configuration.ObjectPostProcessorConfiguration' of type [org.springframework.security.config.annotation.configuration.ObjectPostProcessorConfiguration$$EnhancerBySpringCGLIB$$597fd5e9] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
20:40:04.517 [Test worker] INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'objectPostProcessor' of type [org.springframework.security.config.annotation.configuration.AutowireBeanFactoryObjectPostProcessor] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
20:40:04.523 [Test worker] INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'org.springframework.security.access.expression.method.DefaultMethodSecurityExpressionHandler@7ed78b72' of type [org.springframework.security.access.expression.method.DefaultMethodSecurityExpressionHandler] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
20:40:04.531 [Test worker] INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'org.springframework.security.config.annotation.method.configuration.GlobalMethodSecurityConfiguration' of type [org.springframework.security.config.annotation.method.configuration.GlobalMethodSecurityConfiguration$$EnhancerBySpringCGLIB$$7e54789b] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
20:40:04.561 [Test worker] INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'methodSecurityMetadataSource' of type [org.springframework.security.access.method.DelegatingMethodSecurityMetadataSource] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
20:40:04.578 [Test worker] INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'withBasicAuthSecurityConfiguration' of type [net.devh.test.grpc.config.WithBasicAuthSecurityConfiguration$$EnhancerBySpringCGLIB$$c4115b48] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
20:40:04.587 [Test worker] INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'org.springframework.boot.context.properties.ConversionServiceDeducer$Factory' of type [org.springframework.boot.context.properties.ConversionServiceDeducer$Factory] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
20:40:04.592 [Test worker] INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'grpcChannelsProperties' of type [net.devh.springboot.autoconfigure.grpc.client.GrpcChannelsProperties] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
20:40:04.596 [Test worker] INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'grpcLoadBalancerFactory' of type [io.grpc.util.RoundRobinLoadBalancerFactory] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
20:40:04.603 [Test worker] INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'annotationGlobalClientInterceptorConfigurer' of type [net.devh.springboot.autoconfigure.grpc.client.AnnotationGlobalClientInterceptorConfigurer] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
20:40:04.606 [Test worker] INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'globalClientInterceptorRegistry' of type [net.devh.springboot.autoconfigure.grpc.client.GlobalClientInterceptorRegistry] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
20:40:04.615 [Test worker] INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'addressChannelFactory' of type [net.devh.test.grpc.config.WithBasicAuthSecurityConfiguration$1] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
20:40:04.640 [Test worker] WARN  o.s.aop.framework.CglibAopProxy - Unable to proxy interface-implementing method [public final io.grpc.ServerServiceDefinition net.devh.test.grpc.proto.TestServiceGrpc$TestServiceImplBase.bindService()] because it is marked as final: Consider using interface-based JDK proxies instead!
20:40:04.640 [Test worker] INFO  o.s.aop.framework.CglibAopProxy - Final method [public final io.grpc.ServerServiceDefinition net.devh.test.grpc.proto.TestServiceGrpc$TestServiceImplBase.bindService()] cannot get proxied via CGLIB: Calls to this method will NOT be routed to the target instance and might lead to NPEs against uninitialized fields in the proxy instance.
20:40:04.773 [Test worker] DEBUG n.d.s.a.g.s.AnnotationGlobalServerInterceptorConfigurer - Registering GlobalServerInterceptor: authenticatingServerInterceptor (net.devh.springboot.autoconfigure.grpc.server.security.interceptors.AuthenticatingServerInterceptor@2309f5c9)
20:40:04.774 [Test worker] DEBUG n.d.s.a.g.s.AnnotationGlobalServerInterceptorConfigurer - Registering GlobalServerInterceptor: exceptionTranslatingServerInterceptor (net.devh.springboot.autoconfigure.grpc.server.security.interceptors.ExceptionTranslatingServerInterceptor@1948947b)
20:40:04.782 [Test worker] DEBUG n.d.s.a.g.s.AnnotationGrpcServiceDiscoverer - Found gRPC service: TestService, bean: testService, class: net.devh.test.grpc.server.TestServiceImpl$$EnhancerBySpringCGLIB$$6a7f0526
20:40:04.803 [Test worker] INFO  o.s.c.s.DefaultLifecycleProcessor - Starting beans in phase 2147483647
20:40:04.803 [Test worker] INFO  n.d.s.a.g.s.NettyGrpcServerFactory - Registered gRPC service: TestService, bean: testService, class: net.devh.test.grpc.server.TestServiceImpl$$EnhancerBySpringCGLIB$$6a7f0526
20:40:04.809 [Test worker] INFO  n.d.s.a.g.server.GrpcServerLifecycle - gRPC Server started, listening on address: 0.0.0.0, port: 9090
20:40:04.810 [Test worker] INFO  n.d.t.g.s.AnnotatedSecurityWithBasicAuthTest - Started AnnotatedSecurityWithBasicAuthTest in 0.534 seconds (JVM running for 7.818)
20:40:04.817 [Test worker] INFO  n.d.t.g.s.AbstractSecurityTest - --- Starting tests with secured call ---
20:40:04.820 [grpc-default-executor-2] INFO  n.d.s.a.g.c.AddressChannelNameResolver - Found gRPC server test 127.0.0.1:9090
20:40:04.828 [grpc-default-executor-2] DEBUG n.d.s.a.g.s.s.i.AuthenticatingServerInterceptor - Credentials found: Authenticating...
20:40:05.195 [grpc-default-executor-2] DEBUG n.d.s.a.g.s.s.i.AuthenticatingServerInterceptor - Authentication successful: Continuing as client1 ([ROLE_CLIENT1])
20:40:05.210 [grpc-default-executor-2] DEBUG n.d.test.grpc.server.TestServiceImpl - secure: client1
20:40:05.218 [grpc-default-executor-2] DEBUG n.d.s.a.g.s.s.i.AuthenticatingServerInterceptor - Authentication cleared
20:40:05.223 [grpc-default-executor-0] DEBUG n.d.s.a.g.s.s.i.AuthenticatingServerInterceptor - Credentials found: Authenticating...
20:40:05.416 [grpc-default-executor-0] DEBUG n.d.s.a.g.s.s.i.AuthenticatingServerInterceptor - Authentication successful: Continuing as client1 ([ROLE_CLIENT1])
20:40:05.416 [grpc-default-executor-0] DEBUG n.d.test.grpc.server.TestServiceImpl - secure: client1
20:40:05.419 [grpc-default-executor-0] DEBUG n.d.s.a.g.s.s.i.AuthenticatingServerInterceptor - Authentication cleared
20:40:05.422 [grpc-default-executor-2] DEBUG n.d.s.a.g.s.s.i.AuthenticatingServerInterceptor - Credentials found: Authenticating...
20:40:05.608 [grpc-default-executor-2] DEBUG n.d.s.a.g.s.s.i.AuthenticatingServerInterceptor - Authentication successful: Continuing as client1 ([ROLE_CLIENT1])
20:40:05.609 [grpc-default-executor-2] DEBUG n.d.test.grpc.server.TestServiceImpl - secure: client1
20:40:05.611 [grpc-default-executor-2] DEBUG n.d.s.a.g.s.s.i.AuthenticatingServerInterceptor - Authentication cleared
20:40:05.615 [grpc-default-executor-2] DEBUG n.d.s.a.g.s.s.i.AuthenticatingServerInterceptor - Credentials found: Authenticating...
20:40:05.796 [grpc-default-executor-2] DEBUG n.d.s.a.g.s.s.i.AuthenticatingServerInterceptor - Authentication successful: Continuing as client1 ([ROLE_CLIENT1])
20:40:05.797 [grpc-default-executor-2] DEBUG n.d.test.grpc.server.TestServiceImpl - secure: client1
20:40:05.798 [grpc-default-executor-2] DEBUG n.d.s.a.g.s.s.i.AuthenticatingServerInterceptor - Authentication cleared
20:40:05.800 [grpc-default-executor-2] INFO  n.d.s.a.g.c.AddressChannelNameResolver - Found gRPC server broken 127.0.0.1:9090
20:40:05.806 [grpc-default-executor-2] DEBUG n.d.s.a.g.s.s.i.AuthenticatingServerInterceptor - Credentials found: Authenticating...
20:40:06.007 [grpc-default-executor-2] DEBUG n.d.s.a.g.s.s.i.AuthenticatingServerInterceptor - Authentication successful: Continuing as client2 ([ROLE_CLIENT2])
20:40:06.023 [grpc-default-executor-2] DEBUG n.d.s.a.g.s.s.i.AuthenticatingServerInterceptor - Authentication cleared
20:40:06.029 [grpc-default-executor-2] DEBUG n.d.s.a.g.s.s.i.AuthenticatingServerInterceptor - Credentials found: Authenticating...
20:40:06.216 [grpc-default-executor-2] DEBUG n.d.s.a.g.s.s.i.AuthenticatingServerInterceptor - Authentication successful: Continuing as client2 ([ROLE_CLIENT2])
20:40:06.217 [grpc-default-executor-2] DEBUG n.d.s.a.g.s.s.i.AuthenticatingServerInterceptor - Authentication cleared
20:40:06.221 [grpc-default-executor-2] DEBUG n.d.s.a.g.s.s.i.AuthenticatingServerInterceptor - Credentials found: Authenticating...
20:40:06.408 [grpc-default-executor-2] DEBUG n.d.s.a.g.s.s.i.AuthenticatingServerInterceptor - Authentication successful: Continuing as client2 ([ROLE_CLIENT2])
20:40:06.409 [grpc-default-executor-2] DEBUG n.d.s.a.g.s.s.i.AuthenticatingServerInterceptor - Authentication cleared
20:40:06.413 [grpc-default-executor-2] DEBUG n.d.s.a.g.s.s.i.AuthenticatingServerInterceptor - Credentials found: Authenticating...
20:40:06.598 [grpc-default-executor-2] DEBUG n.d.s.a.g.s.s.i.AuthenticatingServerInterceptor - Authentication successful: Continuing as client2 ([ROLE_CLIENT2])
20:40:06.599 [grpc-default-executor-2] DEBUG n.d.s.a.g.s.s.i.AuthenticatingServerInterceptor - Authentication cleared
20:40:06.600 [Test worker] INFO  n.d.t.g.s.AbstractSecurityTest - --- Test completed ---
20:40:06.602 [Test worker] INFO  o.s.c.a.AnnotationConfigApplicationContext - Closing org.springframework.context.annotation.AnnotationConfigApplicationContext@14a89320: startup date [Sat Nov 10 20:40:04 CST 2018]; root of context hierarchy
20:40:06.602 [Test worker] INFO  o.s.c.s.DefaultLifecycleProcessor - Stopping beans in phase 2147483647
20:40:06.602 [Test worker] INFO  n.d.s.a.g.server.GrpcServerLifecycle - gRPC server shutdown.
20:40:06.605 [Test worker] INFO  n.d.t.g.s.AnnotatedSecurityWithBasicAuthTest - --- AnnotatedSecurityWithBasicAuthConfiguration ---

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::        (v2.0.4.RELEASE)

20:40:06.635 [Test worker] INFO  n.d.t.g.s.AnnotatedSecurityWithBasicAuthTest - Starting AnnotatedSecurityWithBasicAuthTest on Michael-PC with PID 8860 (started by Michael in D:\Code\grpc-spring-boot-starter\tests)
20:40:06.636 [Test worker] INFO  n.d.t.g.s.AnnotatedSecurityWithBasicAuthTest - No active profile set, falling back to default profiles: default
20:40:06.641 [Test worker] INFO  o.s.c.a.AnnotationConfigApplicationContext - Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@530c9c68: startup date [Sat Nov 10 20:40:06 CST 2018]; root of context hierarchy
20:40:06.783 [Test worker] INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'net.devh.springboot.autoconfigure.grpc.client.GrpcClientAutoConfiguration' of type [net.devh.springboot.autoconfigure.grpc.client.GrpcClientAutoConfiguration$$EnhancerBySpringCGLIB$$d2536603] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
20:40:06.807 [Test worker] INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'org.springframework.security.config.annotation.configuration.ObjectPostProcessorConfiguration' of type [org.springframework.security.config.annotation.configuration.ObjectPostProcessorConfiguration$$EnhancerBySpringCGLIB$$597fd5e9] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
20:40:06.816 [Test worker] INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'objectPostProcessor' of type [org.springframework.security.config.annotation.configuration.AutowireBeanFactoryObjectPostProcessor] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
20:40:06.817 [Test worker] INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'org.springframework.security.access.expression.method.DefaultMethodSecurityExpressionHandler@1f2b38d7' of type [org.springframework.security.access.expression.method.DefaultMethodSecurityExpressionHandler] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
20:40:06.823 [Test worker] INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'org.springframework.security.config.annotation.method.configuration.GlobalMethodSecurityConfiguration' of type [org.springframework.security.config.annotation.method.configuration.GlobalMethodSecurityConfiguration$$EnhancerBySpringCGLIB$$7e54789b] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
20:40:06.834 [Test worker] INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'methodSecurityMetadataSource' of type [org.springframework.security.access.method.DelegatingMethodSecurityMetadataSource] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
20:40:06.898 [Test worker] INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'withBasicAuthSecurityConfiguration' of type [net.devh.test.grpc.config.WithBasicAuthSecurityConfiguration$$EnhancerBySpringCGLIB$$c4115b48] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
20:40:06.911 [Test worker] INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'org.springframework.boot.context.properties.ConversionServiceDeducer$Factory' of type [org.springframework.boot.context.properties.ConversionServiceDeducer$Factory] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
20:40:06.922 [Test worker] INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'grpcChannelsProperties' of type [net.devh.springboot.autoconfigure.grpc.client.GrpcChannelsProperties] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
20:40:06.931 [Test worker] INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'grpcLoadBalancerFactory' of type [io.grpc.util.RoundRobinLoadBalancerFactory] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
20:40:06.945 [Test worker] INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'annotationGlobalClientInterceptorConfigurer' of type [net.devh.springboot.autoconfigure.grpc.client.AnnotationGlobalClientInterceptorConfigurer] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
20:40:06.951 [Test worker] INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'globalClientInterceptorRegistry' of type [net.devh.springboot.autoconfigure.grpc.client.GlobalClientInterceptorRegistry] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
20:40:06.965 [Test worker] INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'addressChannelFactory' of type [net.devh.test.grpc.config.WithBasicAuthSecurityConfiguration$1] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
20:40:07.202 [Test worker] DEBUG n.d.s.a.g.s.AnnotationGlobalServerInterceptorConfigurer - Registering GlobalServerInterceptor: authenticatingServerInterceptor (net.devh.springboot.autoconfigure.grpc.server.security.interceptors.AuthenticatingServerInterceptor@148af1b)
20:40:07.214 [Test worker] DEBUG n.d.s.a.g.s.AnnotationGlobalServerInterceptorConfigurer - Registering GlobalServerInterceptor: exceptionTranslatingServerInterceptor (net.devh.springboot.autoconfigure.grpc.server.security.interceptors.ExceptionTranslatingServerInterceptor@320d9c92)
20:40:07.282 [Test worker] DEBUG n.d.s.a.g.s.AnnotationGrpcServiceDiscoverer - Found gRPC service: TestService, bean: testService, class: net.devh.test.grpc.server.TestServiceImpl$$EnhancerBySpringCGLIB$$6a7f0526_2
20:40:07.305 [Test worker] INFO  o.s.c.s.DefaultLifecycleProcessor - Starting beans in phase 2147483647
20:40:07.308 [Test worker] INFO  n.d.s.a.g.s.NettyGrpcServerFactory - Registered gRPC service: TestService, bean: testService, class: net.devh.test.grpc.server.TestServiceImpl$$EnhancerBySpringCGLIB$$6a7f0526_2
20:40:07.313 [Test worker] INFO  n.d.s.a.g.server.GrpcServerLifecycle - gRPC Server started, listening on address: 0.0.0.0, port: 9090
20:40:07.315 [Test worker] INFO  n.d.t.g.s.AnnotatedSecurityWithBasicAuthTest - Started AnnotatedSecurityWithBasicAuthTest in 0.706 seconds (JVM running for 10.324)
20:40:07.322 [Test worker] INFO  n.d.t.g.s.AbstractSecurityTest - --- Starting tests with successful call ---
20:40:07.333 [grpc-default-executor-2] INFO  n.d.s.a.g.c.AddressChannelNameResolver - Found gRPC server test 127.0.0.1:9090
20:40:07.340 [grpc-default-executor-2] DEBUG n.d.s.a.g.s.s.i.AuthenticatingServerInterceptor - Credentials found: Authenticating...
20:40:07.635 [grpc-default-executor-2] DEBUG n.d.s.a.g.s.s.i.AuthenticatingServerInterceptor - Authentication successful: Continuing as client1 ([ROLE_CLIENT1])
20:40:07.641 [grpc-default-executor-2] DEBUG n.d.test.grpc.server.TestServiceImpl - normal
20:40:07.646 [grpc-default-executor-2] DEBUG n.d.s.a.g.s.s.i.AuthenticatingServerInterceptor - Authentication cleared
20:40:07.649 [grpc-default-executor-0] DEBUG n.d.s.a.g.s.s.i.AuthenticatingServerInterceptor - Credentials found: Authenticating...
20:40:07.841 [grpc-default-executor-0] DEBUG n.d.s.a.g.s.s.i.AuthenticatingServerInterceptor - Authentication successful: Continuing as client1 ([ROLE_CLIENT1])
20:40:07.842 [grpc-default-executor-0] DEBUG n.d.test.grpc.server.TestServiceImpl - normal
20:40:07.846 [grpc-default-executor-1] DEBUG n.d.s.a.g.s.s.i.AuthenticatingServerInterceptor - Credentials found: Authenticating...
20:40:07.848 [grpc-default-executor-0] DEBUG n.d.s.a.g.s.s.i.AuthenticatingServerInterceptor - Authentication cleared
20:40:08.043 [grpc-default-executor-1] DEBUG n.d.s.a.g.s.s.i.AuthenticatingServerInterceptor - Authentication successful: Continuing as client1 ([ROLE_CLIENT1])
20:40:08.044 [grpc-default-executor-1] DEBUG n.d.test.grpc.server.TestServiceImpl - normal
20:40:08.045 [grpc-default-executor-1] DEBUG n.d.s.a.g.s.s.i.AuthenticatingServerInterceptor - Authentication cleared
20:40:08.048 [grpc-default-executor-1] DEBUG n.d.s.a.g.s.s.i.AuthenticatingServerInterceptor - Credentials found: Authenticating...
20:40:08.233 [grpc-default-executor-1] DEBUG n.d.s.a.g.s.s.i.AuthenticatingServerInterceptor - Authentication successful: Continuing as client1 ([ROLE_CLIENT1])
20:40:08.234 [grpc-default-executor-1] DEBUG n.d.test.grpc.server.TestServiceImpl - normal
20:40:08.235 [grpc-default-executor-1] DEBUG n.d.s.a.g.s.s.i.AuthenticatingServerInterceptor - Authentication cleared
20:40:08.237 [grpc-default-executor-0] INFO  n.d.s.a.g.c.AddressChannelNameResolver - Found gRPC server broken 127.0.0.1:9090
20:40:08.242 [grpc-default-executor-0] DEBUG n.d.s.a.g.s.s.i.AuthenticatingServerInterceptor - Credentials found: Authenticating...
20:40:08.437 [grpc-default-executor-0] DEBUG n.d.s.a.g.s.s.i.AuthenticatingServerInterceptor - Authentication successful: Continuing as client2 ([ROLE_CLIENT2])
20:40:08.437 [grpc-default-executor-0] DEBUG n.d.test.grpc.server.TestServiceImpl - normal
20:40:08.438 [grpc-default-executor-0] DEBUG n.d.s.a.g.s.s.i.AuthenticatingServerInterceptor - Authentication cleared
20:40:08.441 [grpc-default-executor-0] DEBUG n.d.s.a.g.s.s.i.AuthenticatingServerInterceptor - Credentials found: Authenticating...
20:40:08.623 [grpc-default-executor-0] DEBUG n.d.s.a.g.s.s.i.AuthenticatingServerInterceptor - Authentication successful: Continuing as client2 ([ROLE_CLIENT2])
20:40:08.624 [grpc-default-executor-0] DEBUG n.d.test.grpc.server.TestServiceImpl - normal
20:40:08.624 [grpc-default-executor-0] DEBUG n.d.s.a.g.s.s.i.AuthenticatingServerInterceptor - Authentication cleared
20:40:08.627 [grpc-default-executor-0] DEBUG n.d.s.a.g.s.s.i.AuthenticatingServerInterceptor - Credentials found: Authenticating...
20:40:08.814 [grpc-default-executor-0] DEBUG n.d.s.a.g.s.s.i.AuthenticatingServerInterceptor - Authentication successful: Continuing as client2 ([ROLE_CLIENT2])
20:40:08.814 [grpc-default-executor-0] DEBUG n.d.test.grpc.server.TestServiceImpl - normal
20:40:08.815 [grpc-default-executor-0] DEBUG n.d.s.a.g.s.s.i.AuthenticatingServerInterceptor - Authentication cleared
20:40:08.818 [grpc-default-executor-0] DEBUG n.d.s.a.g.s.s.i.AuthenticatingServerInterceptor - Credentials found: Authenticating...
20:40:08.999 [grpc-default-executor-0] DEBUG n.d.s.a.g.s.s.i.AuthenticatingServerInterceptor - Authentication successful: Continuing as client2 ([ROLE_CLIENT2])
20:40:09.000 [grpc-default-executor-0] DEBUG n.d.test.grpc.server.TestServiceImpl - normal
20:40:09.001 [grpc-default-executor-0] DEBUG n.d.s.a.g.s.s.i.AuthenticatingServerInterceptor - Authentication cleared
20:40:09.002 [Test worker] INFO  n.d.t.g.s.AbstractSecurityTest - --- Test completed ---
20:40:09.004 [Test worker] INFO  o.s.c.a.AnnotationConfigApplicationContext - Closing org.springframework.context.annotation.AnnotationConfigApplicationContext@530c9c68: startup date [Sat Nov 10 20:40:06 CST 2018]; root of context hierarchy
20:40:09.004 [Test worker] INFO  o.s.c.s.DefaultLifecycleProcessor - Stopping beans in phase 2147483647
20:40:09.004 [Test worker] INFO  n.d.s.a.g.server.GrpcServerLifecycle - gRPC server shutdown.
20:40:09.007 [grpc-default-executor-1] INFO  n.d.s.a.g.c.AddressChannelNameResolver - Found gRPC server test 127.0.0.1:9090
20:40:10.011 [Test worker] INFO  n.d.t.g.s.AnnotatedSecurityWithBasicAuthTest - --- AnnotatedSecurityWithBasicAuthConfiguration ---

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::        (v2.0.4.RELEASE)

20:40:10.035 [Test worker] INFO  n.d.t.g.s.AnnotatedSecurityWithBasicAuthTest - Starting AnnotatedSecurityWithBasicAuthTest on Michael-PC with PID 8860 (started by Michael in D:\Code\grpc-spring-boot-starter\tests)
20:40:10.036 [Test worker] INFO  n.d.t.g.s.AnnotatedSecurityWithBasicAuthTest - No active profile set, falling back to default profiles: default
20:40:10.039 [Test worker] INFO  o.s.c.a.AnnotationConfigApplicationContext - Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@17ce75e5: startup date [Sat Nov 10 20:40:10 CST 2018]; root of context hierarchy
20:40:10.098 [Test worker] INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'net.devh.springboot.autoconfigure.grpc.client.GrpcClientAutoConfiguration' of type [net.devh.springboot.autoconfigure.grpc.client.GrpcClientAutoConfiguration$$EnhancerBySpringCGLIB$$d2536603] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
20:40:10.110 [Test worker] INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'org.springframework.security.config.annotation.configuration.ObjectPostProcessorConfiguration' of type [org.springframework.security.config.annotation.configuration.ObjectPostProcessorConfiguration$$EnhancerBySpringCGLIB$$597fd5e9] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
20:40:10.114 [Test worker] INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'objectPostProcessor' of type [org.springframework.security.config.annotation.configuration.AutowireBeanFactoryObjectPostProcessor] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
20:40:10.114 [Test worker] INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'org.springframework.security.access.expression.method.DefaultMethodSecurityExpressionHandler@239f6097' of type [org.springframework.security.access.expression.method.DefaultMethodSecurityExpressionHandler] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
20:40:10.120 [Test worker] INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'org.springframework.security.config.annotation.method.configuration.GlobalMethodSecurityConfiguration' of type [org.springframework.security.config.annotation.method.configuration.GlobalMethodSecurityConfiguration$$EnhancerBySpringCGLIB$$7e54789b] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
20:40:10.123 [Test worker] INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'methodSecurityMetadataSource' of type [org.springframework.security.access.method.DelegatingMethodSecurityMetadataSource] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
20:40:10.134 [Test worker] INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'withBasicAuthSecurityConfiguration' of type [net.devh.test.grpc.config.WithBasicAuthSecurityConfiguration$$EnhancerBySpringCGLIB$$c4115b48] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
20:40:10.141 [Test worker] INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'org.springframework.boot.context.properties.ConversionServiceDeducer$Factory' of type [org.springframework.boot.context.properties.ConversionServiceDeducer$Factory] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
20:40:10.145 [Test worker] INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'grpcChannelsProperties' of type [net.devh.springboot.autoconfigure.grpc.client.GrpcChannelsProperties] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
20:40:10.148 [Test worker] INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'grpcLoadBalancerFactory' of type [io.grpc.util.RoundRobinLoadBalancerFactory] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
20:40:10.154 [Test worker] INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'annotationGlobalClientInterceptorConfigurer' of type [net.devh.springboot.autoconfigure.grpc.client.AnnotationGlobalClientInterceptorConfigurer] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
20:40:10.155 [Test worker] INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'globalClientInterceptorRegistry' of type [net.devh.springboot.autoconfigure.grpc.client.GlobalClientInterceptorRegistry] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
20:40:10.158 [Test worker] INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'addressChannelFactory' of type [net.devh.test.grpc.config.WithBasicAuthSecurityConfiguration$1] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
20:40:10.236 [Test worker] DEBUG n.d.s.a.g.s.AnnotationGlobalServerInterceptorConfigurer - Registering GlobalServerInterceptor: authenticatingServerInterceptor (net.devh.springboot.autoconfigure.grpc.server.security.interceptors.AuthenticatingServerInterceptor@77e51f61)
20:40:10.236 [Test worker] DEBUG n.d.s.a.g.s.AnnotationGlobalServerInterceptorConfigurer - Registering GlobalServerInterceptor: exceptionTranslatingServerInterceptor (net.devh.springboot.autoconfigure.grpc.server.security.interceptors.ExceptionTranslatingServerInterceptor@61fc218b)
20:40:10.243 [Test worker] DEBUG n.d.s.a.g.s.AnnotationGrpcServiceDiscoverer - Found gRPC service: TestService, bean: testService, class: net.devh.test.grpc.server.TestServiceImpl$$EnhancerBySpringCGLIB$$6a7f0526_3
20:40:10.255 [Test worker] INFO  o.s.c.s.DefaultLifecycleProcessor - Starting beans in phase 2147483647
20:40:10.255 [Test worker] INFO  n.d.s.a.g.s.NettyGrpcServerFactory - Registered gRPC service: TestService, bean: testService, class: net.devh.test.grpc.server.TestServiceImpl$$EnhancerBySpringCGLIB$$6a7f0526_3
20:40:10.260 [Test worker] INFO  n.d.s.a.g.server.GrpcServerLifecycle - gRPC Server started, listening on address: 0.0.0.0, port: 9090
20:40:10.261 [Test worker] INFO  n.d.t.g.s.AnnotatedSecurityWithBasicAuthTest - Started AnnotatedSecurityWithBasicAuthTest in 0.248 seconds (JVM running for 13.269)
20:40:10.277 [Test worker] INFO  n.d.t.g.s.AbstractSecurityWithBasicAuthTest - --- Starting tests with secured call bean ---
20:40:10.284 [grpc-default-executor-1] INFO  n.d.s.a.g.c.AddressChannelNameResolver - Found gRPC server bean 127.0.0.1:9090
20:40:10.291 [grpc-default-executor-1] DEBUG n.d.s.a.g.s.s.i.AuthenticatingServerInterceptor - Credentials found: Authenticating...
20:40:10.583 [grpc-default-executor-1] DEBUG n.d.s.a.g.s.s.i.AuthenticatingServerInterceptor - Authentication successful: Continuing as client1 ([ROLE_CLIENT1])
20:40:10.585 [grpc-default-executor-0] DEBUG n.d.s.a.g.s.s.i.AuthenticatingServerInterceptor - Authentication cleared
20:40:10.590 [Test worker] INFO  o.s.c.a.AnnotationConfigApplicationContext - Closing org.springframework.context.annotation.AnnotationConfigApplicationContext@17ce75e5: startup date [Sat Nov 10 20:40:10 CST 2018]; root of context hierarchy
20:40:10.591 [Test worker] INFO  o.s.c.s.DefaultLifecycleProcessor - Stopping beans in phase 2147483647
20:40:10.591 [Test worker] INFO  n.d.s.a.g.server.GrpcServerLifecycle - gRPC server shutdown.

UNAUTHENTICATED: Authentication failed
io.grpc.StatusRuntimeException: UNAUTHENTICATED: Authentication failed
	at io.grpc.stub.ClientCalls.toStatusRuntimeException(ClientCalls.java:222)
	at io.grpc.stub.ClientCalls.getUnchecked(ClientCalls.java:203)
	at io.grpc.stub.ClientCalls.blockingUnaryCall(ClientCalls.java:132)
	at net.devh.test.grpc.proto.TestServiceGrpc$TestServiceBlockingStub.secure(TestServiceGrpc.java:306)
	at net.devh.test.grpc.security.AbstractSecurityWithBasicAuthTest.testSecuredCallBean(AbstractSecurityWithBasicAuthTest.java:82)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:515)
	at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:115)
	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeTestMethod$6(TestMethodTestDescriptor.java:171)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:72)
	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeTestMethod(TestMethodTestDescriptor.java:167)
	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:114)
	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:59)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:105)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:72)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:95)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:71)
	at java.util.ArrayList.forEach(ArrayList.java:1257)
	at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:38)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:110)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:72)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:95)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:71)
	at java.util.ArrayList.forEach(ArrayList.java:1257)
	at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:38)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:110)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:72)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:95)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:71)
	at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:32)
	at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57)
	at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:51)
	at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:170)
	at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:154)
	at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:90)
	at org.gradle.api.internal.tasks.testing.junitplatform.JUnitPlatformTestClassProcessor$CollectAllTestClassesExecutor.processAllTestClasses(JUnitPlatformTestClassProcessor.java:92)
	at org.gradle.api.internal.tasks.testing.junitplatform.JUnitPlatformTestClassProcessor$CollectAllTestClassesExecutor.access$100(JUnitPlatformTestClassProcessor.java:77)
	at org.gradle.api.internal.tasks.testing.junitplatform.JUnitPlatformTestClassProcessor.stop(JUnitPlatformTestClassProcessor.java:73)
	at org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.stop(SuiteTestClassProcessor.java:61)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35)
	at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
	at org.gradle.internal.dispatch.ContextClassLoaderDispatch.dispatch(ContextClassLoaderDispatch.java:32)
	at org.gradle.internal.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:93)
	at com.sun.proxy.$Proxy1.stop(Unknown Source)
	at org.gradle.api.internal.tasks.testing.worker.TestWorker.stop(TestWorker.java:123)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35)
	at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
	at org.gradle.internal.remote.internal.hub.MessageHubBackedObjectConnection$DispatchWrapper.dispatch(MessageHubBackedObjectConnection.java:155)
	at org.gradle.internal.remote.internal.hub.MessageHubBackedObjectConnection$DispatchWrapper.dispatch(MessageHubBackedObjectConnection.java:137)
	at org.gradle.internal.remote.internal.hub.MessageHub$Handler.run(MessageHub.java:404)
	at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
	at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
	at java.lang.Thread.run(Thread.java:748)

20:40:10.594 [Test worker] INFO  n.d.t.g.s.AnnotatedSecurityWithBasicAuthTest - --- AnnotatedSecurityWithBasicAuthConfiguration ---

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::        (v2.0.4.RELEASE)

20:40:10.623 [Test worker] INFO  n.d.t.g.s.AnnotatedSecurityWithBasicAuthTest - Starting AnnotatedSecurityWithBasicAuthTest on Michael-PC with PID 8860 (started by Michael in D:\Code\grpc-spring-boot-starter\tests)
20:40:10.623 [Test worker] INFO  n.d.t.g.s.AnnotatedSecurityWithBasicAuthTest - No active profile set, falling back to default profiles: default
20:40:10.640 [Test worker] INFO  o.s.c.a.AnnotationConfigApplicationContext - Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@5449d83c: startup date [Sat Nov 10 20:40:10 CST 2018]; root of context hierarchy
20:40:10.707 [Test worker] INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'net.devh.springboot.autoconfigure.grpc.client.GrpcClientAutoConfiguration' of type [net.devh.springboot.autoconfigure.grpc.client.GrpcClientAutoConfiguration$$EnhancerBySpringCGLIB$$d2536603] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
20:40:10.716 [Test worker] INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'org.springframework.security.config.annotation.configuration.ObjectPostProcessorConfiguration' of type [org.springframework.security.config.annotation.configuration.ObjectPostProcessorConfiguration$$EnhancerBySpringCGLIB$$597fd5e9] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
20:40:10.719 [Test worker] INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'objectPostProcessor' of type [org.springframework.security.config.annotation.configuration.AutowireBeanFactoryObjectPostProcessor] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
20:40:10.721 [Test worker] INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'org.springframework.security.access.expression.method.DefaultMethodSecurityExpressionHandler@1b74bff' of type [org.springframework.security.access.expression.method.DefaultMethodSecurityExpressionHandler] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
20:40:10.727 [Test worker] INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'org.springframework.security.config.annotation.method.configuration.GlobalMethodSecurityConfiguration' of type [org.springframework.security.config.annotation.method.configuration.GlobalMethodSecurityConfiguration$$EnhancerBySpringCGLIB$$7e54789b] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
20:40:10.731 [Test worker] INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'methodSecurityMetadataSource' of type [org.springframework.security.access.method.DelegatingMethodSecurityMetadataSource] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
20:40:10.741 [Test worker] INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'withBasicAuthSecurityConfiguration' of type [net.devh.test.grpc.config.WithBasicAuthSecurityConfiguration$$EnhancerBySpringCGLIB$$c4115b48] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
20:40:10.746 [Test worker] INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'org.springframework.boot.context.properties.ConversionServiceDeducer$Factory' of type [org.springframework.boot.context.properties.ConversionServiceDeducer$Factory] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
20:40:10.751 [Test worker] INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'grpcChannelsProperties' of type [net.devh.springboot.autoconfigure.grpc.client.GrpcChannelsProperties] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
20:40:10.755 [Test worker] INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'grpcLoadBalancerFactory' of type [io.grpc.util.RoundRobinLoadBalancerFactory] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
20:40:10.761 [Test worker] INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'annotationGlobalClientInterceptorConfigurer' of type [net.devh.springboot.autoconfigure.grpc.client.AnnotationGlobalClientInterceptorConfigurer] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
20:40:10.764 [Test worker] INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'globalClientInterceptorRegistry' of type [net.devh.springboot.autoconfigure.grpc.client.GlobalClientInterceptorRegistry] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
20:40:10.776 [Test worker] INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'addressChannelFactory' of type [net.devh.test.grpc.config.WithBasicAuthSecurityConfiguration$1] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
20:40:10.857 [Test worker] DEBUG n.d.s.a.g.s.AnnotationGlobalServerInterceptorConfigurer - Registering GlobalServerInterceptor: authenticatingServerInterceptor (net.devh.springboot.autoconfigure.grpc.server.security.interceptors.AuthenticatingServerInterceptor@64b7cfd8)
20:40:10.857 [Test worker] DEBUG n.d.s.a.g.s.AnnotationGlobalServerInterceptorConfigurer - Registering GlobalServerInterceptor: exceptionTranslatingServerInterceptor (net.devh.springboot.autoconfigure.grpc.server.security.interceptors.ExceptionTranslatingServerInterceptor@11796a14)
20:40:10.865 [Test worker] DEBUG n.d.s.a.g.s.AnnotationGrpcServiceDiscoverer - Found gRPC service: TestService, bean: testService, class: net.devh.test.grpc.server.TestServiceImpl$$EnhancerBySpringCGLIB$$6a7f0526_4
20:40:10.939 [Test worker] INFO  o.s.c.s.DefaultLifecycleProcessor - Starting beans in phase 2147483647
20:40:10.939 [Test worker] INFO  n.d.s.a.g.s.NettyGrpcServerFactory - Registered gRPC service: TestService, bean: testService, class: net.devh.test.grpc.server.TestServiceImpl$$EnhancerBySpringCGLIB$$6a7f0526_4
20:40:10.952 [Test worker] INFO  n.d.s.a.g.server.GrpcServerLifecycle - gRPC Server started, listening on address: 0.0.0.0, port: 9090
20:40:11.043 [Test worker] INFO  n.d.t.g.s.AnnotatedSecurityWithBasicAuthTest - Started AnnotatedSecurityWithBasicAuthTest in 0.447 seconds (JVM running for 14.052)
20:40:11.129 [Test worker] INFO  n.d.t.g.s.AbstractSecurityWithBasicAuthTest - --- Starting tests with successful call bean ---
20:40:11.131 [grpc-default-executor-0] INFO  n.d.s.a.g.c.AddressChannelNameResolver - Found gRPC server bean 127.0.0.1:9090
20:40:11.154 [grpc-default-executor-0] DEBUG n.d.s.a.g.s.s.i.AuthenticatingServerInterceptor - Credentials found: Authenticating...
20:40:11.484 [grpc-default-executor-0] DEBUG n.d.s.a.g.s.s.i.AuthenticatingServerInterceptor - Authentication successful: Continuing as client1 ([ROLE_CLIENT1])
20:40:11.489 [grpc-default-executor-0] DEBUG n.d.test.grpc.server.TestServiceImpl - normal
20:40:11.492 [grpc-default-executor-0] DEBUG n.d.s.a.g.s.s.i.AuthenticatingServerInterceptor - Authentication cleared
20:40:11.496 [grpc-default-executor-1] DEBUG n.d.s.a.g.s.s.i.AuthenticatingServerInterceptor - Credentials found: Authenticating...
20:40:11.683 [grpc-default-executor-1] DEBUG n.d.s.a.g.s.s.i.AuthenticatingServerInterceptor - Authentication successful: Continuing as client1 ([ROLE_CLIENT1])
20:40:11.683 [grpc-default-executor-1] DEBUG n.d.test.grpc.server.TestServiceImpl - normal
20:40:11.683 [grpc-default-executor-1] DEBUG n.d.s.a.g.s.s.i.AuthenticatingServerInterceptor - Authentication cleared
20:40:11.685 [grpc-default-executor-0] DEBUG n.d.s.a.g.s.s.i.AuthenticatingServerInterceptor - Credentials found: Authenticating...
20:40:11.873 [grpc-default-executor-0] DEBUG n.d.s.a.g.s.s.i.AuthenticatingServerInterceptor - Authentication successful: Continuing as client1 ([ROLE_CLIENT1])
20:40:11.874 [grpc-default-executor-1] DEBUG n.d.test.grpc.server.TestServiceImpl - normal
20:40:11.875 [grpc-default-executor-1] DEBUG n.d.s.a.g.s.s.i.AuthenticatingServerInterceptor - Authentication cleared
20:40:11.879 [grpc-default-executor-0] DEBUG n.d.s.a.g.s.s.i.AuthenticatingServerInterceptor - Credentials found: Authenticating...
20:40:12.093 [grpc-default-executor-0] DEBUG n.d.s.a.g.s.s.i.AuthenticatingServerInterceptor - Authentication successful: Continuing as client1 ([ROLE_CLIENT1])
20:40:12.094 [grpc-default-executor-0] DEBUG n.d.test.grpc.server.TestServiceImpl - normal
20:40:12.094 [grpc-default-executor-0] DEBUG n.d.s.a.g.s.s.i.AuthenticatingServerInterceptor - Authentication cleared
20:40:12.095 [Test worker] INFO  n.d.t.g.s.AbstractSecurityWithBasicAuthTest - --- Test completed ---
20:40:12.097 [Test worker] INFO  o.s.c.a.AnnotationConfigApplicationContext - Closing org.springframework.context.annotation.AnnotationConfigApplicationContext@5449d83c: startup date [Sat Nov 10 20:40:10 CST 2018]; root of context hierarchy
20:40:12.098 [Test worker] INFO  o.s.c.s.DefaultLifecycleProcessor - Stopping beans in phase 2147483647
20:40:12.098 [Test worker] INFO  n.d.s.a.g.server.GrpcServerLifecycle - gRPC server shutdown.

@ST-DDT
Copy link
Collaborator Author

ST-DDT commented Nov 10, 2018

I could observe the error myself now, but I still have no clue how to reproduce it.
The more I try to narrow it down, the less it occurs. The error occurs only very rarely (<0.4%), which makes it frustrating to debug/reproduce.

I look further into it.

@ST-DDT
Copy link
Collaborator Author

ST-DDT commented Nov 11, 2018

I guess I found the error, but I'm not sure since the bug is that hard to reproduce.

While implementing the security layer I followed the existing templates too much (They all have the same error). In Grpc each callback can be called by a different thread (See SO), thus setting the security context only during the startCall method and removing it in onHalfClose has plenty of holes where a different thread could try to mess around. Luckily grpc-java already has a similar concept called context, so I changed my implementation to follow that one.

I will create a PR with a fix after I run the tests another 1000 times (probably tomorrow).

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.

None yet

2 participants