Package io.etcd.jetcd
Interface Auth
- All Superinterfaces:
AutoCloseable,CloseableClient
Interface of auth talking to etcd.
-
Method Summary
Modifier and TypeMethodDescriptiondisables auth of an etcd cluster.enables auth of an etcd cluster.roleAdd(ByteSequence role) adds a new role to an etcd cluster.roleDelete(ByteSequence role) RoleDelete deletes a role.roleGet(ByteSequence role) gets a detailed information of a role.roleGrantPermission(ByteSequence role, ByteSequence key, ByteSequence rangeEnd, Permission.Type permType) grants a permission to a role.roleList()gets a list of all roles.roleRevokePermission(ByteSequence role, ByteSequence key, ByteSequence rangeEnd) revokes a permission from a role.userAdd(ByteSequence user, ByteSequence password) adds a new user to an etcd cluster.userChangePassword(ByteSequence user, ByteSequence password) changes a password of a user.userDelete(ByteSequence user) deletes a user from an etcd cluster.userGet(ByteSequence user) gets a detailed information of a user.userGrantRole(ByteSequence user, ByteSequence role) grants a role to a user.userList()gets a list of all users.userRevokeRole(ByteSequence user, ByteSequence role) revokes a role of a user.Methods inherited from interface io.etcd.jetcd.support.CloseableClient
close
-
Method Details
-
authEnable
CompletableFuture<AuthEnableResponse> authEnable()enables auth of an etcd cluster.- Returns:
- the response.
-
authDisable
CompletableFuture<AuthDisableResponse> authDisable()disables auth of an etcd cluster.- Returns:
- the response.
-
userAdd
adds a new user to an etcd cluster.- Parameters:
user- the userpassword- the password- Returns:
- the response.
-
userDelete
deletes a user from an etcd cluster.- Parameters:
user- the user- Returns:
- the response.
-
userChangePassword
CompletableFuture<AuthUserChangePasswordResponse> userChangePassword(ByteSequence user, ByteSequence password) changes a password of a user.- Parameters:
user- the userpassword- the password- Returns:
- the response.
-
userGet
gets a detailed information of a user.- Parameters:
user- the user- Returns:
- the response.
-
userList
CompletableFuture<AuthUserListResponse> userList()gets a list of all users.- Returns:
- the response.
-
userGrantRole
grants a role to a user.- Parameters:
user- the userrole- the role to grant- Returns:
- the response.
-
userRevokeRole
revokes a role of a user.- Parameters:
user- the userrole- the role to revoke- Returns:
- the response.
-
roleAdd
adds a new role to an etcd cluster.- Parameters:
role- the role to add- Returns:
- the response.
-
roleGrantPermission
CompletableFuture<AuthRoleGrantPermissionResponse> roleGrantPermission(ByteSequence role, ByteSequence key, ByteSequence rangeEnd, Permission.Type permType) grants a permission to a role.- Parameters:
role- the rolekey- the keyrangeEnd- the range endpermType- the type- Returns:
- the response.
-
roleGet
gets a detailed information of a role.- Parameters:
role- the role to get- Returns:
- the response.
-
roleList
CompletableFuture<AuthRoleListResponse> roleList()gets a list of all roles.- Returns:
- the response.
-
roleRevokePermission
CompletableFuture<AuthRoleRevokePermissionResponse> roleRevokePermission(ByteSequence role, ByteSequence key, ByteSequence rangeEnd) revokes a permission from a role.- Parameters:
role- the rolekey- the keyrangeEnd- the range end- Returns:
- the response.
-
roleDelete
RoleDelete deletes a role.- Parameters:
role- the role to delete.- Returns:
- the response.
-