Example: Removing security permissions for Teracloud® Streams users
Removing the security permissions
for a user might require that you remove role or group permissions
in addition to the specific user permissions. This example shows you
how to remove the security permissions for a Teracloud®
Streams user
by removing both specific user permissions and role permissions.
Procedure
- Create a Teracloud®
Streams domain
and instance, and start the domain.For example:
export STREAMS_ZKCONNECT=external-ZooKeeper-connection-string streamtool mkdomain -d domain1 --property sws.port=0 --property jmx.port=0 streamtool genkey -d domain1 streamtool startdomain -d domain1 streamtool mkinstance -d domain1 -i instance1
For more information about creating domains and instances, see Setting up a Teracloud Streams enterprise domain on multiple resources. - To complete this procedure in the interactive
streamtool
interface, enter the following command:streamtool
Using the interactivestreamtool
interface saves you time. Teracloud® Streams caches some command options and information so that you do not have to reenter them. Also, you do not have to specify streamtool before each command. To exit the interactivestreamtool
interface, enter exit or quit. - Create the
Example
role.mkrole -d domain1 -i instance1 Example CDISC0154I The Example role was created for following instance: instance1. The instance is in the domain1 domain.
- Add the user to the
Example
role.You do not have to reenter the domain and instance name on this and subsequent commands because this information is cached.adduserrole Example user1 CDISC0156I The Example role was assigned to the following user: user1. The role applies to the instance1 instance in the domain1 domain.
- View the access control list (ACL) for the
config
instance security object.getacl config # object: config # parent: instance # owner: DomainAdministrator # persistent: yes user:admin1:rw---o role:InstanceUser:r----- role:DomainAdministrator:rw---o role:InstanceAdministrator:rw---o
- View the permissions for
user1
. Note thatuser1
has no permissionslspermission user1 application-log:------ config:------ hosts:------ instance:------ jobgroup_default:------ jobs:------ jobs-override:------ system-log:------
- Configure read and write permission on the
config
instance security object foruser1
.setacl user:user1:rw config CDISC0019I The access control list for the instance1 instance in the domain1 domain was updated.
- Configure read and write permission on the
config
instance security object for theExample
role.setacl role:Example:rw config CDISC0019I The access control list for the instance1 instance in the domain1 domain was updated.
- View the permissions for
user1
. Note thatuser1
has read and write (rw
) permission on theconfig
instance security object.lspermission user1 application-log:------ config:rw---- hosts:------ instance:------ jobgroup_default:------ jobs:------ jobs-override:------ system-log:------
- Remove read and write permission on the
config
instance security object foruser1
.setacl user:user1-rw config CDISC0019I The access control list for the instance1 instance in the domain1 domain was updated.
- View the permissions for
user1
. Note that the read and write permission on theconfig
instance security object is not removed foruser1
.lspermission user1 application-log:------ config:rw---- hosts:------ instance:------ jobgroup_default:------ jobs:------ jobs-override:------ system-log:------
- View the ACL on the
config
instance security object and note that theExample
role has read and write permission.getacl config # object: config # parent: instance # owner: DomainAdministrator # persistent: yes user:admin1:rw---o role:InstanceUser:r----- role:Example:rw---- role:DomainAdministrator:rw---o role:InstanceAdministrator:rw---o
- List the instance roles and note that
user1
is a member of theExample
role.lsrole Role: Example Users: user1 Groups: Role: InstanceAdministrator Users: admin1 Groups: Role: InstanceUser Users: Groups:
- Remove read and write permission on the
config
instance security object for theExample
role.setacl role:Example-rw config CDISC0019I The access control list for the instance1 instance in the domain1 domain was updated.
- View the permissions for
user1
. Note that the read and write permission on theconfig
instance security object is now removed foruser1
.lspermission user1 application-log:------ config:------ hosts:------ instance:------ jobgroup_default:------ jobs:------ jobs-override:------ system-log:------
-
To exit the interactive
streamtool
interface, enter exit or quit.