- •Alexandre Borges
- •Credits
- •Introduction 74
- •Chapter 3: Networking 159
- •Free access for Packt account holders
- •Instant updates on new Packt books
- •Table of Contents Preface 1 Chapter 1: ips and Boot Environments 7
- •Introduction 8
- •Installing a package, verifying its content, and fixing the package corruption 13
- •In an inactive boot environment 64
- •Chapter 2: zfs 73
- •Chapter 4: Zones 235
- •Preface
- •Questions
- •Ips and Boot
- •In this chapter, we will cover the following topics:
- •Introduction
- •Determining the current package publisher
- •Getting ready
- •Installing a package, verifying its content, and fixing the package corruption
- •Getting ready
- •Interface
- •Getting ready
- •Listing and renaming a boot environment
- •Getting ready
- •Configuring an ips local repository
- •Getting ready
- •Configuring a secondary ips local repository
- •Getting ready
- •Publishing packages into a repository
- •Getting ready
- •Adding big applications into a repository
- •Getting ready
- •Creating your own package and publishing it
- •Getting ready
- •Managing an ips publisher on Solaris 11
- •Getting ready
- •Pinning publishers
- •Getting ready
- •Getting ready
- •Creating a mirror repository
- •Getting ready
- •Getting ready
- •Listing and creating a boot environment
- •Getting ready
- •Getting ready
- •Activating a boot environment
- •Getting ready
- •Getting ready
- •References
- •Introduction
- •Creating zfs storage pools and filesystems
- •Getting ready
- •Playing with zfs faults and properties
- •Getting ready
- •Creating a zfs snapshot and clone
- •Getting ready
- •Performing a backup in a zfs filesystem
- •Getting ready
- •Handling logs and caches
- •Getting ready
- •Managing devices in storage pools
- •Getting ready
- •Configuring spare disks
- •Getting ready
- •Handling zfs snapshots and clones
- •Getting ready
- •Playing with comstar
- •Getting ready
- •Mirroring the root pool
- •Getting ready
- •Zfs shadowing
- •Getting ready
- •Configuring zfs sharing with the smb share
- •Getting ready
- •Setting and getting other zfs properties
- •Getting ready
- •Playing with the zfs swap
- •Getting ready
- •References
- •Networking
- •Introduction
- •Playing with Reactive Network Configuration
- •Getting ready
- •Internet Protocol Multipathing
- •Getting ready
- •Setting the link aggregation
- •Getting ready
- •Configuring network bridging
- •Getting ready
- •Getting ready
- •Configuring the dhcp server
- •Getting ready
- •Configuring Integrated Load Balancer
- •Getting ready
- •IPv4 forwarding enabled enabled
- •References
- •Introduction
- •Getting ready
- •Id name status path brand ip
- •Getting ready
- •Value is basic (only the owner can modify it).
- •22:52:06 5849 Rcapd
- •Implementing a flow control
- •Getting ready
- •Getting ready
- •Installing: This may take several minutes...
- •References
- •Playing with Oracle
- •Introduction
- •Reviewing smf operations
- •Getting ready
- •Its dependencies
- •Handling manifests and profiles
- •Getting ready
- •Creating smf services
- •Getting ready
- •Getting ready
- •Troubleshooting Oracle Solaris 11 services
- •Getting ready
- •References
- •Configuring and
- •Introduction
- •Getting ready
- •References
- •Configuring and
- •Introduction
- •Configuring and using rbac
- •Getting ready
- •Playing with least privileges
- •Getting ready
- •References
- •Administering and
- •Introduction
- •Monitoring and handling process execution
- •Getting ready
- •2014 May 4 19:25:10, load average: 0.38, 0.30, 0.28 syscalls: 12648
- •Managing processes' priority on Solaris 11
- •Getting ready
- •Configuring fss and applying it to projects
- •Getting ready
- •References
- •Isbn-13: 978-0131568198
- •Configuring the
- •Introduction
- •Configuring the syslog
- •Getting ready
- •Getting ready
- •References
- •Aggregation 191
- •Identifier (fmri) 294 faults, zfs
- •(Trill) 198
- •Values, l4 (Communication)
- •Virtual ip address (vip address) 228 virtual memory size (vsz) 396 virtual network interface (vnic) 238 virtual network, zone
- •Virtual to virtual (v2v) migration 280
- •About Packt Enterprise
- •Writing for Packt
References
f Installing Oracle Solaris 11 Systems at http://docs.oracle.com/cd/ E23824_01/html/E21798/docinfo.html#scrolltoc
f Booting and Shutting Down Oracle Solaris 11.1 Systems at http://docs.oracle. com/cd/E26502_01/html/E28983/docinfo.html#scrolltoc
f Configuring a Basic DNS Server + Client in Solaris 11, Paul Johnson, at http://www.oracle.com/technetwork/articles/servers-storage- admin/solaris11-net-svcs-ips-2086656.html
f Exploring Networking, Services, and the New Image Packaging System In Oracle Solaris 11, Alexandre Borges, at http://www.oracle.com/technetwork/articles/ servers-storage-admin/solaris11-net-svcs-ips-2086656.html
7
Configuring and
Administering RBAC
and Least Privileges
In this chapter, we will cover the following topics:
f Configuring and using RBAC
f Playing with least privileges
Introduction
Role-based access control (RBAC) is an amazing feature, which also exists on Oracle Solaris 11 (its origin was in Oracle Solaris 8), that primarily makes it possible to restrict the granted privileges to a normal user for executing tasks. Putting this another way, RBAC makes it feasible to delegate only the necessary privileges for a regular user to be able to accomplish administrative tasks in a way similar to that of a sudo program. When compared with a sudo program, the main difference is the fact that RBAC is completely integrated in the operating system, and it is used during the user logon process to Oracle Solaris 11. Moreover, RBAC offers a more granular access to privileges than sudo does, and integration with another great feature from Oracle Solaris 11 named least privilege, which is used to cut out unnecessary privileges from processes and programs, allows you to reduce the attack surface of a hacker.
Configuring and Administering RBAC and Least Privileges
Configuring and using rbac
Before explaining and implementing the RBAC feature, it is necessary to remember why RBAC is necessary and, afterwards, to learn some fundamental concepts.
According to our previous study on Oracle Solaris 11, it would not be possible for a normal user to reboot an Oracle Solaris 11 system, as shown in the following command:
root@solaris11-1:~# useradd -d /export/home/aborges -m -s /bin/bash aborges
80 blocks
root@solaris11-1:~# passwd aborges
New Password: hacker123!
Re-enter new Password: hacker123!
passwd: password successfully changed for aborges root@solaris11-1:~# su - aborges
Oracle Corporation SunOS 5.11 11.1 September 2012 aborges@solaris11-1:~$ reboot
reboot: permission denied aborges@solaris11-1:~$
A simple and completely inappropriate solution would be to give a password from the root
account to user aborges. However, this is unimaginable in a professional company. Another and a recommended solution is to use RBAC, which is a security feature that allows regular users to accomplish administrative tasks such as rebooting a system, as we have tried previously.
The RBAC framework contains the following objects:
f Role: This is a special type of user that is created to execute administrative tasks, although it isn't possible to log in to a system and the correct procedure is to log in as a user and to assume the role using the su command. As the role is a kind of user,
it is configured in the /etc/passwd file and it has a password defined in the /etc/
shadow file. However, different from a user, it isn't possible to log in to Oracle Solaris 11 using a role. The user must log in using a normal account and then they can assume a role using the su command.
Chapter 7
f Profile: This is a set of commands. Any role assigned to a profile can execute any command from this profile. All system profiles are defined in the /etc/security/ prof_attr.d/core-os file, and local profiles can be defined in the /etc/ security/prof_attr file. To list all the profiles, use the following command:
root@solaris11-1:~# getent prof_attr | more
Software Installation:RO::Add application software to the system:auths=solaris.smf.manage.servicetags;profiles=ZFS File System Management;help=RtSoftwareInst
all.html
NTP Management:RO::Manage the NTP service:auths=solaris.smf. manage.ntp,solaris.smf.value.ntp
Desktop Configuration:RO::Configure graphical desktop software:auths=solaris.smf.manage.dt.login,solaris.smf.manage. x11,solaris.smf.manage.font,solaris.smf.m
anage.opengl
Device Security:RO::Manage devices and Volume Manager:auths=solaris.smf.manage.dt.login,solaris. device.*,solaris.smf.manage.vt,solaris.smf.manage.allocate;he
lp=RtDeviceSecurity.html
Desktop Removable Media User:RO::Access removable media for desktop user:
(truncated output)
f Authorization: This represents a special form of privilege that is set in order
to accomplish specific tasks, such as accessing a CD-ROM and managing the CUPS printing service, NTP service, Zones, SMF framework, and so on. Typically, authorizations are created either from the Oracle Solaris installation or from new installed software. All system authorizations are defined in the /etc/ security/auth_attr.d/core-os file, and local authorizations are defined
in the /etc/security/auth_attr file. To list all the authorizations, we run the following command:
root@solaris11-1:~# getent auth_attr | more
solaris.smf.read.ocm:::Read permissions for protected Oracle Configuration Manager Service Properties::
solaris.smf.value.ocm:::Change Oracle Configuration Manager System Repository Service values::
solaris.smf.manage.ocm:::Manage Oracle Configuration Manager System Repository Service states::
solaris.smf.manage.cups:::Manage CUPS service states::help=ManageCUPS.html
solaris.smf.manage.zfs-auto-snapshot:::Manage the ZFS Automatic Snapshot Service::
Configuring and Administering RBAC and Least Privileges
solaris.smf.value.tcsd:::Change TPM Administation value properties::
(truncated output)
f Privilege: This is a singular right that can be assigned to a user, role, command, or even a system.
f Execution attributes: These are commands that are defined in the /etc/ security/exec_attr.d/core-os (system execution attributes) or /etc/ security/exec_attr files (local definitions), and they are assigned to one
or more profiles. To list all the execution attributes, we run the following command:
root@solaris11-1:~# getent exec_attr | more
DTrace Toolkit:solaris:cmd:::/usr/dtrace/DTT/*/*:privs=dtrace_ kernel,dtrace_proc,dtrace_user
Desktop Configuration:solaris:cmd:RO::/usr/bin/ scanpci:euid=0;privs=sys_config
Desktop Configuration:solaris:cmd:RO::/usr/X11/bin/ scanpci:euid=0;privs=sys_config
OpenLDAP Server Administration:suser:cmd:RO::/usr/sbin/slapd:uid=o penldap;gid=openldap;privs=basic,net_privaddr
OpenLDAP Server Administration:suser:cmd:RO::/usr/sbin/slapacl:uid
=openldap;gid=openldap
(truncated output)
f Profile shell: This is a special kind of profile (pfbash, pfsh, pfcsh, or pfzsh) assigned to users during a su command to assume a role or a login shell that allows access to specific privileges. It is necessary to use any one of these profile shells.
f Security policy: This defines default privileges and profiles for users. The related configuration file is /etc/security/policy.conf, as shown in the following command:
root@solaris11-1:~# more /etc/security/policy.conf
There are two ways to use RBAC. The first method is simpler and more straightforward; you can create and assign a profile directly to a user account in order to log in as a normal user and use the pfexec command to execute additional commands from the assigned profile.
The second method is to put all mentioned concepts about RBAC (commands, authorizations, profiles, roles, and users) together following a schema as shown next (from right to left):
User <-- Role <-- Profile <-- Commands and/or Authorizations
Chapter 7
The second method is more complex, and the required steps to use RBAC, as described in the previous sequence, are as follows:
Create a role using the roleadd command.
Create a profile, editing the /etc/security/prof_attr file.
Assign commands to the created profile (step 2) in /etc/security/exec_attr or assign authorizations (/etc/security/auth_attr) to the profile in the /etc/ security/prof_attr file.
Assign the profile to the role using the rolemod command.
Create a password for the role using the passwd command.
Assign one or more users to the role using the usermod command.
When the user needs to use the assigned commands, execute su - <rolename>.
This is nice! This is a summary of the concepts required to manage RBAC. We will learn how to execute a step-by-step procedure for both methods.
