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 instance1For 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
streamtoolinterface, enter the following command:streamtoolUsing the interactivestreamtoolinterface 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 interactivestreamtoolinterface, enter exit or quit. - Create the
Examplerole.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
Examplerole.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
configinstance 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 thatuser1has no permissionslspermission user1 application-log:------ config:------ hosts:------ instance:------ jobgroup_default:------ jobs:------ jobs-override:------ system-log:------ - Configure read and write permission on the
configinstance 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
configinstance security object for theExamplerole.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 thatuser1has read and write (rw) permission on theconfiginstance security object.lspermission user1 application-log:------ config:rw---- hosts:------ instance:------ jobgroup_default:------ jobs:------ jobs-override:------ system-log:------ - Remove read and write permission on the
configinstance 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 theconfiginstance 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
configinstance security object and note that theExamplerole 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
user1is a member of theExamplerole.lsrole Role: Example Users: user1 Groups: Role: InstanceAdministrator Users: admin1 Groups: Role: InstanceUser Users: Groups: - Remove read and write permission on the
configinstance security object for theExamplerole.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 theconfiginstance security object is now removed foruser1.lspermission user1 application-log:------ config:------ hosts:------ instance:------ jobgroup_default:------ jobs:------ jobs-override:------ system-log:------ -
To exit the interactive
streamtoolinterface, enter exit or quit.