Package com.daml.ledger.api.v2.admin
Class UserManagementServiceGrpc.UserManagementServiceStub
java.lang.Object
io.grpc.stub.AbstractStub<S>
io.grpc.stub.AbstractAsyncStub<UserManagementServiceGrpc.UserManagementServiceStub>
com.daml.ledger.api.v2.admin.UserManagementServiceGrpc.UserManagementServiceStub
- Enclosing class:
- UserManagementServiceGrpc
public static final class UserManagementServiceGrpc.UserManagementServiceStub
extends io.grpc.stub.AbstractAsyncStub<UserManagementServiceGrpc.UserManagementServiceStub>
A stub to allow clients to do asynchronous rpc calls to service UserManagementService.
Service to manage users and their rights for interacting with the Ledger API
served by a participant node.
The authorization rules for its RPCs are specified on the ``<RpcName>Request``
messages as boolean expressions over these facts:
1. ``HasRight(r)`` denoting whether the authenticated user has right ``r`` and
2. ``IsAuthenticatedUser(uid)`` denoting whether ``uid`` is the empty string or equal to the id of the authenticated user.
3. ``IsAuthenticatedIdentityProviderAdmin(idp)`` denoting whether ``idp`` is equal to the ``identity_provider_id``
of the authenticated user and the user has an IdentityProviderAdmin right.
If `user_id` is set to the empty string (the default), then the data for the authenticated user will be retrieved.
If `identity_provider_id` is set to an empty string, then it's effectively set to the value of access token's 'iss' field if that is provided.
If `identity_provider_id` remains an empty string, the default identity provider will be assumed.
The fields of request messages (and sub-messages) are marked either as ``Optional`` or ``Required``:
1. ``Optional`` denoting the client may leave the field unset when sending a request.
2. ``Required`` denoting the client must set the field to a non-default value when sending a request.
A user resource consists of:
1. a set of properties represented by the ``User`` message,
2. a set of user rights, where each right is represented by the ``Right`` message.
A user resource, once it has been created, can be modified.
In order to update the properties represented by the ``User`` message use the ``UpdateUser`` RPC. The only fields that can be modified are those marked as ``Modifiable``.
In order to grant or revoke user rights use ``GrantRights' and ``RevokeRights`` RPCs.
-
Nested Class Summary
Nested classes/interfaces inherited from class io.grpc.stub.AbstractStub
io.grpc.stub.AbstractStub.StubFactory<T extends io.grpc.stub.AbstractStub<T>> -
Method Summary
Modifier and TypeMethodDescriptionbuild(io.grpc.Channel channel, io.grpc.CallOptions callOptions) voidcreateUser(UserManagementServiceOuterClass.CreateUserRequest request, io.grpc.stub.StreamObserver<UserManagementServiceOuterClass.CreateUserResponse> responseObserver) Create a new user.voiddeleteUser(UserManagementServiceOuterClass.DeleteUserRequest request, io.grpc.stub.StreamObserver<UserManagementServiceOuterClass.DeleteUserResponse> responseObserver) Delete an existing user and all its rights.voidgetUser(UserManagementServiceOuterClass.GetUserRequest request, io.grpc.stub.StreamObserver<UserManagementServiceOuterClass.GetUserResponse> responseObserver) Get the user data of a specific user or the authenticated user.voidgrantUserRights(UserManagementServiceOuterClass.GrantUserRightsRequest request, io.grpc.stub.StreamObserver<UserManagementServiceOuterClass.GrantUserRightsResponse> responseObserver) Grant rights to a user.voidlistUserRights(UserManagementServiceOuterClass.ListUserRightsRequest request, io.grpc.stub.StreamObserver<UserManagementServiceOuterClass.ListUserRightsResponse> responseObserver) List the set of all rights granted to a user.voidlistUsers(UserManagementServiceOuterClass.ListUsersRequest request, io.grpc.stub.StreamObserver<UserManagementServiceOuterClass.ListUsersResponse> responseObserver) List all existing users.voidrevokeUserRights(UserManagementServiceOuterClass.RevokeUserRightsRequest request, io.grpc.stub.StreamObserver<UserManagementServiceOuterClass.RevokeUserRightsResponse> responseObserver) Revoke rights from a user.voidupdateUser(UserManagementServiceOuterClass.UpdateUserRequest request, io.grpc.stub.StreamObserver<UserManagementServiceOuterClass.UpdateUserResponse> responseObserver) Update selected modifiable attribute of a user resource described by the ``User`` message.voidupdateUserIdentityProviderId(UserManagementServiceOuterClass.UpdateUserIdentityProviderIdRequest request, io.grpc.stub.StreamObserver<UserManagementServiceOuterClass.UpdateUserIdentityProviderIdResponse> responseObserver) Update the assignment of a user from one IDP to another.Methods inherited from class io.grpc.stub.AbstractAsyncStub
newStub, newStubMethods inherited from class io.grpc.stub.AbstractStub
getCallOptions, getChannel, withCallCredentials, withChannel, withCompression, withDeadline, withDeadlineAfter, withExecutor, withInterceptors, withMaxInboundMessageSize, withMaxOutboundMessageSize, withOnReadyThreshold, withOption, withWaitForReady
-
Method Details
-
build
protected UserManagementServiceGrpc.UserManagementServiceStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) - Specified by:
buildin classio.grpc.stub.AbstractStub<UserManagementServiceGrpc.UserManagementServiceStub>
-
createUser
public void createUser(UserManagementServiceOuterClass.CreateUserRequest request, io.grpc.stub.StreamObserver<UserManagementServiceOuterClass.CreateUserResponse> responseObserver) Create a new user.
-
getUser
public void getUser(UserManagementServiceOuterClass.GetUserRequest request, io.grpc.stub.StreamObserver<UserManagementServiceOuterClass.GetUserResponse> responseObserver) Get the user data of a specific user or the authenticated user.
-
updateUser
public void updateUser(UserManagementServiceOuterClass.UpdateUserRequest request, io.grpc.stub.StreamObserver<UserManagementServiceOuterClass.UpdateUserResponse> responseObserver) Update selected modifiable attribute of a user resource described by the ``User`` message.
-
deleteUser
public void deleteUser(UserManagementServiceOuterClass.DeleteUserRequest request, io.grpc.stub.StreamObserver<UserManagementServiceOuterClass.DeleteUserResponse> responseObserver) Delete an existing user and all its rights.
-
listUsers
public void listUsers(UserManagementServiceOuterClass.ListUsersRequest request, io.grpc.stub.StreamObserver<UserManagementServiceOuterClass.ListUsersResponse> responseObserver) List all existing users.
-
grantUserRights
public void grantUserRights(UserManagementServiceOuterClass.GrantUserRightsRequest request, io.grpc.stub.StreamObserver<UserManagementServiceOuterClass.GrantUserRightsResponse> responseObserver) Grant rights to a user. Granting rights does not affect the resource version of the corresponding user.
-
revokeUserRights
public void revokeUserRights(UserManagementServiceOuterClass.RevokeUserRightsRequest request, io.grpc.stub.StreamObserver<UserManagementServiceOuterClass.RevokeUserRightsResponse> responseObserver) Revoke rights from a user. Revoking rights does not affect the resource version of the corresponding user.
-
listUserRights
public void listUserRights(UserManagementServiceOuterClass.ListUserRightsRequest request, io.grpc.stub.StreamObserver<UserManagementServiceOuterClass.ListUserRightsResponse> responseObserver) List the set of all rights granted to a user.
-
updateUserIdentityProviderId
public void updateUserIdentityProviderId(UserManagementServiceOuterClass.UpdateUserIdentityProviderIdRequest request, io.grpc.stub.StreamObserver<UserManagementServiceOuterClass.UpdateUserIdentityProviderIdResponse> responseObserver) Update the assignment of a user from one IDP to another.
-