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

SetSystemSettingsAsync throw EventStore.Client.AccessDeniedException when connecting with ops but using admin credentials in request #117

Open
Lougarou opened this issue May 7, 2021 · 0 comments
Labels
bug Something isn't working operations
Milestone

Comments

@Lougarou
Copy link
Contributor

Lougarou commented May 7, 2021

Describe the bug
Creating a connection with Ops and then calling SetSystemSettingsAsync with Admin credentials throws AccessDeniedException when it should not.

To Reproduce
Steps to reproduce the behavior:

  1. Establish a connection with Ops
  2. Call client.SetSystemSettingsAsync(systemSettings, new UserCredentials("admin", "changeit"))
  3. AccessDeniedException

Expected behavior
Operation should complete successfully.

Actual behavior

Client Side verbose logs:

14:45:53 DBG] Append to stream - $settings@Any.
[14:45:53 DBG] Starting gRPC call. Method type: 'ClientStreaming', URI: 'https://188.166.177.208:2113/event_store.client.streams.Streams/Append'.
[14:45:53 VRB] Starting deadline timeout. Duration: 00:00:04.9831440.
[14:45:54 DBG] Sending message.
[14:45:54 VRB] Serialized 'EventStore.Client.Streams.AppendReq' to 17 byte message.
[14:45:54 VRB] Message sent.
[14:45:54 VRB] Response headers received.
[14:45:54 INF] Call failed with gRPC error status. Status code: 'PermissionDenied', Message: 'Access Denied'.
[14:45:54 DBG] Finished gRPC call.
[14:45:54 VRB] Appending event to stream - { "streamName": "JHNldHRpbmdz" }@69a6738a-b59d-4103-a048-d682cd32138a $settings.
[14:45:54 ERR] Error writing message.
System.InvalidOperationException: Can't write the message because the call is complete.
[14:45:54 DBG] Completing client stream.
Unhandled exception. System.AggregateException: One or more errors occurred. (Status(StatusCode="PermissionDenied", Detail="Access Denied"))
---> EventStore.Client.AccessDeniedException: Status(StatusCode="PermissionDenied", Detail="Access Denied")
---> Grpc.Core.RpcException: Status(StatusCode="PermissionDenied", Detail="Access Denied")
--- End of inner exception stack trace ---
at EventStore.Client.Interceptors.TypedExceptionInterceptor.b__5_0[TRequest,TResponse](Task1 t) at System.Threading.Tasks.ContinuationResultTaskFromResultTask2.InnerInvoke()
at System.Threading.Tasks.Task.<>c.<.cctor>b__277_0(Object obj)
at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
--- End of stack trace from previous location ---
at EventStore.Client.EventStoreClient.AppendToStreamInternal(AppendReq header, IEnumerable`1 eventData, EventStoreClientOperationOptions operationOptions, UserCredentials userCredentials, CancellationToken cancellationToken)
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
at System.Threading.Tasks.Task.Wait()
at ticket109639.Program.Main(String[] args)

Server Side logs:
Failed authorization check for "ops" in 00:30:37.3085738 with "streams : write p: {streamId : $settings} Deny : Policy : Legacy 1 12/31/9999 23:59:59 +00:00 : default:denied by default:Deny, $"

EventStore details

  • EventStore server version: 20.10.2

  • Operating system: MacOS

  • EventStore client version (if applicable): 21.2

@Lougarou Lougarou added the bug Something isn't working label May 7, 2021
@Lougarou Lougarou added this to the 2021 Phase 2 milestone May 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working operations
Projects
None yet
Development

No branches or pull requests

3 participants