Redwood Documentation

Product Documentation

 

›UNIX Agents

RunMyJobsPlatform Agents

External Platforms

  • Connecting Redwood Server to External Platforms

Credentials

  • Storing Credentials
  • Credential Protocols

Platform Process Servers

  • On-site Platform Process Servers
  • Cloud Platform Agents
  • Using the Wizard to Create Process Servers
  • Configuring Platform Agents
  • Spool Host Agents
  • The Environment of Platform Agent OS Processes
  • Processing Platform Processes
  • Process Server Services
  • Configuring Agentless Process Servers
  • Automatically Updating Platform Agents
  • Enabling TLS
  • Creating Monitoring Checks
  • Configuring Load Balancing on Platform Agents
  • Platform Agent Registry Entries
  • Monitoring Servers with Platform Process Servers

UNIX Agents

  • UNIX Process Servers
  • UNIX Process Server Configuration Data
  • File Events on UNIX
  • Creating UNIX Process Servers (Advanced)
  • Choosing a User Switching Security Mode
  • Controlling Unix Platform Agents
  • Uninstalling Redwood Server Platform Agents from UNIX

Windows Agents

  • Creating a Microsoft Windows Process Server
  • File Events on Microsoft Windows Process Servers
  • Configuration of a Microsoft Windows Process Server
  • Managed Services
  • Configuring Platform Agents on Microsoft Windows
  • Automating Windows tasks that require a desktop window
  • Uninstalling Redwood Server from Microsoft Windows

Agent Definition Types

  • Using the BASH Definition Type
  • Using the KSH Definition Type
  • Using the CSH Definition Type
  • Using the Perl Definition Type
  • Using the Python Definition Type
  • Using the PowerShell Definition Type
  • Using the Visual Basic Script Definition Type
  • Using the CMD Definition Type
  • Using the R Process Definition Type
  • Using the DCL Definition Type
  • Using Platform Definition Types
  • Using the OS Native Definition Type
  • Microsoft Windows Definition Types
  • Using the SQLPLUS Definition Type
  • Using the FTP Definition Type
  • Using the Groovy Definition Type

Command Line Tools

  • Command Line System Tools
  • jtool
  • jcat
  • jdescription
  • jevent
  • jecho
  • jftp
  • JFTP Return Codes
  • jgetcredential
  • jgetfile
  • jgetpar
  • jjoin
  • jlink
  • jlog
  • jmail
  • jmessage
  • jmonitor
  • jputfile
  • jregister
  • jrfc
  • jscp
  • jtool screenshot
  • jscript
  • jsecret
  • jsleep
  • jsplit
  • api-tool.jar

OpenVMS Process Servers

  • Creating HP OpenVMS Process Servers
  • Installing the Platform Agent on HP OpenVMS
  • Configuring HP OpenVMS Process Servers
  • File Events on HP OpenVMS
  • HP OpenVMS Definition Types

AS/400 Connector

  • IBM AS/400 Connector Architecture
  • Setting up the IBM AS/400 Connector
  • Creating an IBM AS/400 Process Server
  • Files on AS/400 Raise Events
  • Using the AS/400 Definition Type
  • Redwood Server OS Support
  • IBM z/OS Definition Types
  • Using the JCL_FTP Definition Type
  • IBM z/OS System Tools

Reference

  • Balancing the Load
  • Credential Protocols
← Creating UNIX Process Servers (Advanced)Controlling Unix Platform Agents →

Choosing a User Switching Security Mode

On UNIX platforms, it is common to have a separate user for an application. When you need to interact with these applications, commands often have the requirement that they need to be executed as a specific user.

There are several ways to switch users on UNIX systems, and the scheduler supports these. Choosing one is important, as it decides what functionality is available to the process definitions. It is also related to any potential security restrictions that may be in place in your installation.

note

In all scenarios we assume that the software is installed as user 'redwood'.

The installation script of the platform agent requires you to choose a security option from the following:

  1. Plain: Running processes only as a normal user.
  2. Root: Running processes as any user, the network agent running as root.
  3. Setuid: Running processes as any user, the network agent running as an unprivileged user, using setuid.
  4. Sudo: Running processes as any user, the network agent running as an unprivileged user, using sudo.

In the case that all your processes can run as the same UNIX account you can use the plain security mode. This has the least security implications as there is no user switching, and no elevated privileges are required.

If you want the scheduler to be able to run processes using a variety of user accounts you can choose between the root, setuid and sudo options. The root and setuid options work on all UNIX systems, and do not require additional software. The setuid method does require that the job-processor binary is installed with elevated privileges. For the setuid and root options the list of allowed users is configured in scheduler configuration files only. The sudo option allows the use of sudo to run processes under different users, and to perform other tasks that require elevated privileges. For the sudo option the configuration of the sudo command itself also plays a role in the decision as to what is allowed.

Redwood recommends that the setuid scenario is used as it does not require the installation of additional software (if sudo is not yet installed) and is less complicated.

The installation script will ask for the scenario you have chosen. It will store the requested user switching mode in a configuration file. The network-processor will then use the scenario defined there. To change this configuration setting afterwards, see Configuring Platform Agents.

The following sections describe the different scenarios in detail,

Plain: Running processes only as a normal user.

In this scenario, no user switching is done. All processes will run using the same UNIX account. Processes that specify that they need to run under a particular user account will fail (if this is not the same account).

No special action needs to be performed to prepare this scenario.

The startup script will switch to the user specified at installation time and run the network-processor under that account. All job-processor processes run using the same account.

Root: Running processes as any user, the platform agent running as root

In this scenario, user switching is done. You can run processes as any user. You can limit the UNIX accounts the processes run under by creating a blacklist or whitelist file in the agent configuration files.

The startup script will switch to the root user and run the network-processor under that account.

The advantage of this scenario is that it is fast (no overhead is spent changing file ownership) and has a low chance of having configuration problems where files or output cannot be read since the network-processor can access all files as root.

The disadvantage of this scenario is that the network-processor continuously runs as root, forming a larger attack target than the other scenarios.

Setuid: Running processes as any user, the platform agent running as an unprivileged user, using setuid

In this scenario, user switching is done. You can run processes as any user. UNIX level user switching is done using the setuid bit on the job-processor. Changing file ownership is also done using the setuid bit.

This scenario is relatively easy to set up, as it does not require the possible installation of sudo, and executes quickly. You can limit the UNIX accounts the processes run under by creating a blacklist or whitelist in the agent configuration files.

The startup script will switch to the non-root user specified at installation time (for example, redwood ) and run the network-processor under that account. When a process runs, the job-processor will change the ownership of the files to the correct account, run the process and then change the file ownership back to the scheduler user.

Sudo: Running processes as any user, the platform agent running as an unprivileged user, using sudo

In this scenario, user switching is done. You can run processes as any user. UNIX level user switching and changing file ownership is done using the sudo command.

This requires that you have sudo installed and configured.

This scenario allows you to limit the control of switch user accounts to the sudo control files (usually /etc/sudoers). The only thing that runs as root is the chown command for files that are under the control of the scheduler.

  • The startup script will switch to the non-root user specified at installation time (for example, redwood) and run the network-processor under that account.
  • When a process runs, first sudo -S -u root chown will be called to change the ownership of the files to the correct account.
  • The process is run via sudo -S -u <user> job-processor.
  • When the job-processor has finished a final sudo -S -u root chown will change the ownership of the files back to the user running the network-processor.

This scenario does take a little more effort to configure, as you may have to install sudo or a comparable security system, and configure that security system so the platform agent can do what it needs to do. It can also be a little harder to analyze when problems occur and processes cannot be run under a particular account, as this can be caused by several configuration issues.

The installer script will configure /etc/sudoers (or prepare for it when not run as root). If you use a different solution than sudo, run the installer as follows:

$ VISUDO=your-visudo-equivalent $SHELL ./<installer>.bin

If your security solution does not provide a visudo compatible program, just substitute vi.

After the installation finishes, remove the sudo commands in the root.sh file and configure your solution manually. You may also need to override the SwitchUserCommand parameter on the process server.

note

The SwitchUserCommand process server parameter can be used to change the command used from sudo to something else, or to set a path to the sudo executable. Note that it is only used for sudo User Switch Mode and has no effect if you set it when a different mode is used.

Security Considerations

When you use sudo user-switching mode, a user who gained access to the Redwood Server user could access files owned by root because redwood needs to be granted the permission to change any file to any user. To avoid this, you can specify your own sudo command. Redwood Server ships with an example sudo.sh shell script which improves the security by sanity-checking the parameters. You may edit this file to match your security requirements. See Configuring Platform Agents for more information.

See Also

UNIX Platform Agents

← Creating UNIX Process Servers (Advanced)Controlling Unix Platform Agents →
  • Plain: Running processes only as a normal user.
  • Root: Running processes as any user, the platform agent running as root
  • Setuid: Running processes as any user, the platform agent running as an unprivileged user, using setuid
  • Sudo: Running processes as any user, the platform agent running as an unprivileged user, using sudo
  • Security Considerations
  • See Also
Docs
Getting StartedInstallationFinance InstallationConcepts
TroubleshootingArchiving
Learn and Connect
Support Portal
BlogEventsResources
ISO/ IEC 27001 Information Security Management
Automate to be human

2023 All Rights Reserved |

Terms of Service | Policies | Cookies | Glossary | Third-party Software | Contact | Copyright | Impressum |