<?Pub UDT _bookmark _target?><chapter id="softmgt-1"><?Pub Tag atict:info tracking="on" ref="10"?><?Pub Tag atict:user
user="sharonr" fullname="Sharon Veach"?><title>Software Management in Trusted Extensions (Tasks)</title><indexterm><primary>administering</primary><secondary>third-party software</secondary>
</indexterm><indexterm><primary>software</primary><secondary>administering third-party</secondary>
</indexterm><highlights><para>This chapter contains information about ensuring that third-party software
runs in a trustworthy manner on a system that is configured with Solaris Trusted Extensions.</para><itemizedlist remap="jumplist"><listitem><para><olink targetptr="addsoft-12" remap="internal">Adding Software to Trusted Extensions</olink></para>
</listitem><listitem><para><olink targetptr="addsoft-17" remap="internal">Trusted Processes in the Window
System</olink></para>
</listitem><listitem><para><olink targetptr="addsoft-41" remap="internal">Managing Software in Trusted
Extensions (Tasks)</olink></para>
</listitem>
</itemizedlist>
</highlights><sect1 id="addsoft-12"><title>Adding Software to Trusted Extensions</title><para><indexterm><primary>importing</primary><secondary>software</secondary></indexterm><indexterm><primary>software</primary><secondary>importing</secondary></indexterm>Any software that can be added to a Solaris system can be
added to a system that is configured with Trusted Extensions. Additionally, programs
that use Trusted Extensions APIs can be added. Adding software to a Trusted Extensions system
is similar to adding software to a Solaris system that is running non-global
zones.</para><itemizedlist><para>For example, packaging issues affect systems that have installed non-global
zones. Package parameters define the following:</para><listitem><para><emphasis role="strong">The zone scope of the package &ndash;</emphasis> The
scope determines the type of zone in which a specific package can be installed.</para>
</listitem><listitem><para><emphasis role="strong">The visibility of the package &ndash;</emphasis> Visibility
determines whether a package must be installed and be identical in all zones.</para>
</listitem><listitem><para><emphasis role="strong">The limitation of the package &ndash;</emphasis> One
limitation is whether a package must be installed in the current zone only.</para>
</listitem>
</itemizedlist><para>In Trusted Extensions, programs are typically installed in the global zone
for use by regular users in labeled zones. For details about installing packages
in zones, see <olink targetdoc="group-sa" targetptr="z.pkginst.ov-1" remap="external">Chapter 24, <citetitle remap="chapter">About Packages and Patches on a Solaris System With Zones Installed (Overview),</citetitle> in <citetitle remap="book">System Administration Guide:  Virtualization Using the Solaris Operating System</citetitle></olink>.
Also, see the <olink targetdoc="group-refman" targetptr="pkgadd-1m" remap="external"><citerefentry><refentrytitle>pkgadd</refentrytitle><manvolnum>1M</manvolnum></citerefentry></olink> man
page.</para><para>At a Trusted Extensions site, the system administrator and the security
administrator work together to install software. The security administrator
evaluates software additions for adherence to security policy. When the software
requires privileges or authorizations to succeed, the Security Administrator
role assigns an appropriate rights profile to the users of that software.</para><para>To import software from removable media requires authorization. An account
with the Allocate Device authorization can import or export data from removable
media. Data can include executable code. A regular user can only import data
at a label within that user's clearance.</para><para>The System Administrator role is responsible for adding the programs
that the security administrator approves.</para><sect2 id="addsoft-53"><title>Solaris Security Mechanisms
for Software</title><indexterm><primary>security mechanisms</primary><secondary>Solaris</secondary>
</indexterm><itemizedlist><para>Trusted Extensions uses the same security mechanisms as the Solaris OS. The
mechanisms include the following:</para><listitem><para><emphasis role="strong">Authorizations &ndash;</emphasis> Users
of a program can be required to have a particular authorization. For information
about authorizations, see <olink targetdoc="group-sa" targetptr="rbac-29" remap="external"><citetitle remap="section">Solaris RBAC Elements and Basic Concepts</citetitle> in <citetitle remap="book">System Administration Guide: Security Services</citetitle></olink>.
Also, see the <olink targetdoc="group-refman" targetptr="auth-attr-4" remap="external"><citerefentry><refentrytitle>auth_attr</refentrytitle><manvolnum>4</manvolnum></citerefentry></olink> and <olink targetdoc="group-refman" targetptr="getauthattr-3secdb" remap="external"><citerefentry><refentrytitle>getauthattr</refentrytitle><manvolnum>3SECDB</manvolnum></citerefentry></olink> man pages.</para>
</listitem><listitem><para><emphasis role="strong">Privileges &ndash;</emphasis> Programs
and processes can be assigned privileges. For information about privileges,
see <olink targetdoc="group-sa" targetptr="prbac-1" remap="external">Chapter 8, <citetitle remap="chapter">Using Roles and Privileges (Overview),</citetitle> in <citetitle remap="book">System Administration Guide: Security Services</citetitle></olink>.
Also, see the <olink targetdoc="group-refman" targetptr="privileges-5" remap="external"><citerefentry><refentrytitle>privileges</refentrytitle><manvolnum>5</manvolnum></citerefentry></olink> man
page.</para><para>The <command>ppriv</command> command provides a debugging
utility. For details, see the <olink targetdoc="group-refman" targetptr="ppriv-1" remap="external"><citerefentry><refentrytitle>ppriv</refentrytitle><manvolnum>1</manvolnum></citerefentry></olink> man
page. For instructions on using this utility with programs that work in non-global
zones, see <olink targetdoc="group-sa" targetptr="z.admin.task-2" remap="external"><citetitle remap="section">Using the ppriv Utility</citetitle> in <citetitle remap="book">System Administration Guide:  Virtualization Using the Solaris Operating System</citetitle></olink>.</para>
</listitem><listitem><para><emphasis role="strong">Right Profiles &ndash;</emphasis> Rights
profiles collect security attributes in one place for assignment to users
or roles. For information about rights profiles, see <olink targetdoc="group-sa" targetptr="rbac-33" remap="external"><citetitle remap="section">RBAC Rights Profiles</citetitle> in <citetitle remap="book">System Administration Guide: Security Services</citetitle></olink>. Trusted Extensions adds
CDE actions to the type of executables that can be assigned security attributes.</para>
</listitem><listitem><para><emphasis role="strong">Trusted libraries &ndash;</emphasis> Dynamically
shared libraries that are used by <command>setuid</command>, <command>setgid</command>,
and privileged programs can be loaded only from trusted directories. As in
the Solaris OS, the <command>crle</command> command is used to add a privileged
program's shared library directories to the list of trusted directories. For
details, see the <olink targetdoc="group-refman" targetptr="crle-1" remap="external"><citerefentry><refentrytitle>crle</refentrytitle><manvolnum>1</manvolnum></citerefentry></olink> man
page.</para>
</listitem>
</itemizedlist>
</sect2><sect2 id="addsoft-45"><title>Evaluating Software for Security</title><indexterm><primary>trusted programs</primary><secondary>defined</secondary>
</indexterm><indexterm><primary>applications</primary><secondary>trusted and trustworthy</secondary>
</indexterm><indexterm><primary>trustworthy programs</primary>
</indexterm><indexterm><primary>evaluating programs for security</primary>
</indexterm><para>When software has been assigned privileges or when it runs with an alternate
user ID or group ID, the software becomes <emphasis>trusted</emphasis>. Trusted
software can bypass aspects of the Trusted Extensions security policy. Be aware
that you can make software trusted even though it might not be worthy of trust.
The security administrator must wait to give privileges to software until
careful scrutiny has revealed that the software uses the privileges in a trustworthy
manner.</para><itemizedlist><para>Programs fall into three categories on a trusted system:</para><listitem><para><emphasis role="strong">Programs that require no security
attributes &ndash;</emphasis> Some programs run at a single level and require
no privileges. These programs can be installed in a public directory, such
as <filename>/usr/local</filename>. For access, assign the programs as commands
in the rights profiles of users and roles.</para>
</listitem><listitem><para><indexterm><primary>real UID of root</primary><secondary>required for applications</secondary></indexterm><indexterm><primary>root UID</primary><secondary>required for applications</secondary></indexterm><emphasis role="strong">Programs that run as root &ndash;</emphasis> Some programs execute
with <command>setuid 0</command>. Such programs can be assigned an effective
UID of <literal>0</literal> in a rights profile. The security administrator
then assigns the profile to an administrative role.</para><tip><para>If the application can use privileges in a trustworthy manner,
assign the needed privileges to the application, and do not execute the program
as <literal>root</literal>.</para>
</tip>
</listitem><listitem><para><indexterm><primary><filename class="devicefile">/dev/kmem</filename> kernel image file</primary><secondary>security violation</secondary></indexterm><indexterm><primary>privileges</primary><secondary>non-obvious reasons for requiring</secondary></indexterm><indexterm><primary><filename class="devicefile">kmem</filename> kernel image file</primary></indexterm><emphasis role="strong">Programs that require
privileges &ndash;</emphasis> Some programs might need privileges for reasons
that are not obvious. Even if a program is not performing any function that
seems to violate system security policy, the program might be doing something
internally that violates security. For example, the program could be using
a shared log file, or the program could be reading from <filename>/dev/kmem</filename>.
For security concerns, see the <olink targetdoc="group-refman" targetptr="mem-7d" remap="external"><citerefentry><refentrytitle>mem</refentrytitle><manvolnum>7D</manvolnum></citerefentry></olink> man
page.</para><para>Sometimes, an internal policy override is not particularly
important to the application's correct operation. Rather, the override provides
a convenient feature for users.</para><para>If your organization has access to the source code, check if you can
remove the operations that require policy overrides without affecting the
application's performance.</para>
</listitem>
</itemizedlist><sect3 id="addsoft-59"><title>Developer Responsibilities When Creating Trusted
Programs</title><indexterm><primary>trusted programs</primary><secondary>adding</secondary>
</indexterm><para>Even though a program's developer can manipulate privilege sets in the
source code, if the security administrator does not assign the required privileges
to the program, the program will fail. The developer and security administrator
need to cooperate when creating trusted programs.</para><orderedlist><para><indexterm><primary>developer responsibilities</primary></indexterm>A
developer who writes a trusted program must do the following:</para><listitem><para>Understand where the program requires privileges to do its
work.</para>
</listitem><listitem><para>Know and follow techniques, such as privilege bracketing,
for safely using privileges in programs.</para>
</listitem><listitem><para>Be aware of the security implications when assigning privileges
to a program. The program must not violate security policy.</para>
</listitem><listitem><para>Compile the program by using shared libraries that are linked
to the program from a trusted directory.</para><para>For additional information,
see <olink targetdoc="gssapipg" remap="external"><citetitle remap="book">Solaris Security for Developers Guide</citetitle></olink>. For examples of code for Trusted Extensions,
see <olink targetdoc="trsoldev" remap="external"><citetitle remap="book">Solaris Trusted Extensions Developer&rsquo;s Guide</citetitle></olink>.</para>
</listitem>
</orderedlist>
</sect3><sect3 id="addsoft-23"><title>Security Administrator Responsibilities for
Trusted Programs</title><para><indexterm><primary>applications</primary><secondary>evaluating for security</secondary></indexterm><indexterm><primary>commercial applications</primary><secondary>evaluating</secondary></indexterm>The security administrator is
responsible for testing and evaluating new software. After determining that
the software is trustworthy, the security administrator configures rights
profiles and other security-relevant attributes for the program.</para><orderedlist><para>The security administrator responsibilities include the following:</para><listitem><para>Make sure that the programmer and the program distribution
process is trusted.</para>
</listitem><listitem><itemizedlist><para>From one of the following sources, determine which privileges are required
by the program:</para><listitem><para>Ask the programmer.</para>
</listitem><listitem><para>Search the source code for any privileges that the program
expects to use.</para>
</listitem><listitem><para>Search the source code for any authorizations that the program
requires of its users.</para>
</listitem><listitem><para>Use the debugging options to the <command>ppriv</command> command
to search for use of privilege. For examples, see the <olink targetdoc="group-refman" targetptr="ppriv-1" remap="external"><citerefentry><refentrytitle>ppriv</refentrytitle><manvolnum>1</manvolnum></citerefentry></olink> man page.</para>
</listitem>
</itemizedlist>
</listitem><listitem><para>Examine the source code to make sure that the code behaves
in a trustworthy manner regarding the privileges that the program needs to
operate.</para><para>If the program fails to use privilege in a trustworthy
manner, and you can modify the program's source code, then modify the code.
A security consultant or developer who is knowledgeable about security can
modify the code. Modifications might include privilege bracketing or checking
for authorizations.</para><para>The assignment of privileges must be manual. A program that fails due
to lack of privilege can be assigned privileges. Alternatively, the security
administrator might decide to assign an effective UID or GID to make the privilege
unnecessary.</para>
</listitem>
</orderedlist>
</sect3>
</sect2>
</sect1><sect1 id="addsoft-17"><title>Trusted Processes in the Window System</title><indexterm><primary>trusted processes</primary><secondary>in the window system</secondary>
</indexterm><indexterm><primary>window system</primary><secondary>trusted processes</secondary>
</indexterm><itemizedlist><para>In Solaris Trusted Extensions (CDE), the following window system processes are trusted:</para><listitem><para>Front Panel</para>
</listitem><listitem><para>Subpanels of the Front Panel</para>
</listitem><listitem><para>Workspace Menu</para>
</listitem><listitem><para>File Manager</para>
</listitem><listitem><para>Application Manager</para>
</listitem>
</itemizedlist><para><indexterm><primary>administrative actions</primary><secondary>trusted</secondary></indexterm>The window system's trusted processes are available to everyone,
but access to administrative actions is restricted to roles in the global
zone.</para><para><indexterm><primary>icon visibility</primary><secondary>in the Workspace Menu</secondary></indexterm><indexterm><primary>icon visibility</primary><secondary>in the File Manager</secondary></indexterm>In the File Manager,
if an action is not in one of the account's profiles, the icon for the action
is not visible. In the Workspace Menu, if an action is not in one of the account's
profiles, the action is visible, but an error displays if the action is invoked.</para><para><indexterm><primary>window manager</primary></indexterm><indexterm><primary><filename>Xtsolusersession</filename> script</primary></indexterm><indexterm><primary><command>dtwm</command> command</primary></indexterm><indexterm><primary>rights profiles</primary><secondary>controlling the use of actions</secondary></indexterm><indexterm><primary>actions</primary><secondary>restricted by rights profiles</secondary></indexterm><indexterm><primary>restricting</primary><secondary>actions by rights profiles</secondary></indexterm><indexterm><primary>trusted processes</primary><secondary>starting actions</secondary></indexterm>In Trusted CDE, the window manager, <command>dtwm</command>, calls
the <command>Xtsolusersession</command> script. This script works with the
window manager to invoke actions that are started from the window system.
The <command>Xtsolusersession</command> script checks the account's rights
profiles when the account attempts to launch an action. In either case, if
the action is in an assigned rights profile, the action is run with the security
attributes that are specified in the profile.</para><sect2 id="addsoft-47"><title>Adding Trusted CDE Actions</title><indexterm><primary>actions</primary><secondary>adding new Trusted CDE actions</secondary>
</indexterm><para>The process of creating and using CDE actions in Trusted Extensions is similar
to the process in the Solaris OS. Adding actions is described in the <olink targetdoc="cdeadmin" targetptr="configappmanager-18247" remap="external">Chapter 4, <citetitle remap="chapter">Adding and Administering  Applications,</citetitle> in <citetitle remap="book">Solaris Common Desktop Environment: Advanced User&rsquo;s and System Administrator&rsquo;s Guide</citetitle></olink>.</para><para>As in the Solaris OS, the use of actions can be controlled by the rights
profile mechanism. In Trusted Extensions, several actions have been assigned security
attributes in the rights profiles of administrative roles. The security administrator
can also use the Rights tool to assign security attributes to new actions.</para><para><indexterm><primary>actions</primary><secondary>use differences between CDE and Trusted CDE</secondary></indexterm>The following table summarizes the main
differences between a Solaris system and a Solaris Trusted Extensions system when you
create and use actions.</para><table frame="topbot" pgwide="1" id="addsoft-24"><title>Constraints on CDE
Actions in Trusted Extensions</title><tgroup cols="2" colsep="0" rowsep="0"><?PubTbl tgroup dispwid="7.00in"?><colspec colnum="1" colname="column1" colwidth="3.93*"/><colspec colnum="2" colname="column2" colwidth="9.07*"/><thead><row><entry colname="column1" rowsep="1"><para>Solaris CDE Actions</para>
</entry><entry colname="column2" rowsep="1"><para>Trusted CDE Actions</para>
</entry>
</row>
</thead><tbody><row><entry colname="column1" morerows="1" align="left" valign="top"><para>New actions can be created by anyone within the originator's home directory.</para><para>A new action is automatically usable by its creator.</para>
</entry><entry colname="column2" align="left" valign="top"><para>An action is usable only if the action is in a rights profile that is
assigned to the user. The search path for actions differs. Actions in a user's
home directory are processed last instead of first. Therefore, no one can
customize existing actions.</para>
</entry>
</row><row><entry colname="column2" align="left" valign="top"><para>Users can create a new action in their home directory, but the action
might not be usable.</para>
</entry>
</row><row><entry colname="column1" align="left" valign="top">
</entry><entry colname="column2" align="left" valign="top"><para>Users with the All profile can use an action that they create. Otherwise,
the security administrator must add the name of the new action to one of the
account's rights profiles.</para>
</entry>
</row><row><entry colname="column1" rowsep="1" align="left" valign="top">
</entry><entry colname="column2" rowsep="1" align="left" valign="top"><para>To start the action, the user uses the File Manager. The system administrator
can place actions in public directories.</para>
</entry>
</row><row><entry colname="column1" rowsep="1"><para>Actions can be dragged and dropped to the Front Panel.</para>
</entry><entry colname="column2" rowsep="1"><para>The Front Panel is part of the trusted path. The window manager recognizes
only the administratively added actions that are located in the <filename>/usr/dt</filename> and <filename>/etc/dt</filename> subdirectories. Even with the
All profile, a user cannot drag a new action to the Front Panel. Actions from
a user's home directory are not recognized by the window manager. The manager
only checks the public directories.</para>
</entry>
</row><row><entry colname="column1" rowsep="1" align="left" valign="top"><para>Actions can do privileged operations if they are run by <literal>root</literal>.</para>
</entry><entry colname="column2" rowsep="1" align="left" valign="top"><para>Actions can do privileged operations if the actions have been assigned
privileges in a rights profile that has been assigned to a user.</para>
</entry>
</row><row><entry colname="column1"><para>Actions are not managed by the Solaris Management Console.</para>
</entry><entry colname="column2"><para>Actions are assigned to rights profiles in the Rights tool of the Solaris Management Console.
If new actions are added, the security administrator can make the new actions
available.</para>
</entry>
</row>
</tbody>
</tgroup>
</table>
</sect2>
</sect1><sect1 id="addsoft-41"><title>Managing Software in Trusted Extensions (Tasks)</title><indexterm><primary>applications</primary><secondary>installing</secondary>
</indexterm><indexterm><primary>Managing Software in Trusted Extensions (Tasks)</primary>
</indexterm><indexterm><primary>tasks and task maps</primary><secondary>Managing Software in Trusted Extensions (Tasks)</secondary>
</indexterm><para>Managing software in Trusted Extensions is similar to managing software
on a Solaris system that has installed non-global zones. For details
about zones, see <olink targetdoc="group-sa" targetptr="zone" remap="external">Part&nbsp;II, <citetitle remap="chapter">Zones,</citetitle> in <citetitle remap="book">System Administration Guide:  Virtualization Using the Solaris Operating System</citetitle></olink>.</para><task id="addsoft-40"><title>How to Add a Software Package in Trusted Extensions</title><indexterm><primary>removable media</primary><secondary>mounting</secondary>
</indexterm><indexterm><primary>packages</primary><secondary>accessing the media</secondary>
</indexterm><taskprerequisites><para>You must be in a role that can allocate a device.</para>
</taskprerequisites><procedure><step><para>Start from the appropriate workspace.</para><stepalternatives><step><para>To install a software package in the global zone, stay in the
global zone.</para>
</step><step><para>To install a software package in a labeled zone, create a workspace
at that label.</para><para>For details, see <olink targetdoc="trssug" targetptr="shared-commontasks-39" remap="external"><citetitle remap="section">How to Change the Label of a Workspace</citetitle> in <citetitle remap="book">Solaris Trusted Extensions User&rsquo;s Guide</citetitle></olink>.</para>
</step>
</stepalternatives>
</step><step><para>Allocate the CD-ROM drive.</para><para>For details, see <olink targetdoc="trssug" targetptr="ugelem-27" remap="external"><citetitle remap="section">How to Allocate a Device in Trusted Extensions</citetitle> in <citetitle remap="book">Solaris Trusted Extensions User&rsquo;s Guide</citetitle></olink>.</para>
</step><step><para>Install the software.</para><para>For details, see <olink targetdoc="group-sa" targetptr="swmgrpkgsconcepts-30493" remap="external"><citetitle remap="section">Where to Find Software Management Tasks</citetitle> in <citetitle remap="book">System Administration Guide: Basic Administration</citetitle></olink>.</para>
</step><step><para>Deallocate the device when you are finished.</para><para>For details,
see <olink targetdoc="trssug" targetptr="ugelem-27" remap="external"><citetitle remap="section">How to Allocate a Device in Trusted Extensions</citetitle> in <citetitle remap="book">Solaris Trusted Extensions User&rsquo;s Guide</citetitle></olink>.</para>
</step>
</procedure>
</task><task id="addsoft-54"><title>How to Install a Java Archive File
in Trusted Extensions</title><indexterm><primary>Java archive (JAR) files</primary><secondary>installing</secondary>
</indexterm><indexterm><primary>software</primary><secondary>installing Java programs</secondary>
</indexterm><tasksummary><para>This procedure downloads a <trademark>Java</trademark> archive (JAR)
file to the global zone. From the global zone, the administrator can make
it available to regular users.</para>
</tasksummary><taskprerequisites><para>The security administrator has verified that the source of the Java
program is trustworthy, that the method of delivery is secure, and that the
program can run in a trustworthy manner.</para><para>You are in the System Administrator role in the global zone. The Software
Installation rights profile includes the Open action for Java code.</para>
</taskprerequisites><procedure><step><para>Download the JAR file to the <filename class="directory">/tmp</filename> directory.</para><para>For example, if you are selecting software from <ulink url="http://www.sunfreeware.com" type="url">http://www.sunfreeware.com</ulink>,
use the site's Web Start Wizard Installation of Freeware instructions.</para>
</step><step><para>Open the File Manager and navigate to the <filename class="directory">/tmp</filename> directory.</para>
</step><step><para>Double-click the downloaded file.</para>
</step><step><para>To install the software, answer the questions in the dialog boxes.</para>
</step><step><para>Read the installation log.</para>
</step>
</procedure><example id="addsoft-14"><title>Downloading a JAR File to a User Label</title><para>To limit the security risk, the system administrator downloads the software
to a single label within a regular user's accreditation range. Then, the security
administrator tests the JAR file at that label. When the software passes the
test, the security administrator then downgrades the label to <constant>ADMIN_LOW</constant>. The system administrator installs the software on an NFS server
to make it available to all users.</para><orderedlist><listitem><para>First, the system administrator creates a workspace at a user
label.</para>
</listitem><listitem><para>In that workspace, he downloads the JAR file.</para>
</listitem><listitem><para>At that label, the security administrator tests the file.</para>
</listitem><listitem><para>Then, the security administrator changes the label of the
file to <constant>ADMIN_LOW</constant>.</para>
</listitem><listitem><para>Finally, the system administrator copies the file to an NFS
server whose label is <constant>ADMIN_LOW</constant>.</para>
</listitem>
</orderedlist>
</example>
</task>
</sect1>
</chapter><?Pub *0000027234 0?>