[[ucc_options]]
Common options to UCC
---------------------

The following table lists the options understood by most UCC commands. Most 
commands have additional options. You can always get a summary of all available
options for a command by calling UCC with the "-h" or "--help" option, for example

-----------
ucc batch --help
-----------

Since it is not possible to give all the required options on the commandline, 
it is mandatory to create a preferences file containing e.g. your settings for 
keystore, registry etc. 



.Common options for the UCC
[options="header"]
|==============================
|option (short and long form)| description
| -c,--configuration <Properties_file>  | Properties file containing your preferences. By default, a file 'userhome/.ucc/preferences' is checked.
| -k,--authenticationMethod <auth>   |      Authentication method to use (default: X509)
| -o,--output <Output_dir>    |          Directory for any output produced (default is the current directory)
| -r,--registry <List_of_Registry_URLs>  |        The comma-separated list of URLs of UNICORE registries
| -v,--verbose | Verbose mode 
| -h,--help | Print help message
| -y,--with-timing            |      Timing mode
|================================



Security and VO related options
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

In general you need a keystore containing your identity in order 
to use UNICORE, as well as a truststore file (or directory) containing trusted 
certificates.

To use UCC with infrastructures that run a SAML-enabled VO server such as UVOS, there are 
additional options for specifying the VO server, your VO etc. 
Please see xref:ucc_saml[] section for details about the VO support.

Here is a list of security related options.

.Security and VO options for the UCC
[options="header"]
|==============================
|option (short and long form)     |  description
| -U, --user                  |      User ID to use remotely (if you have multiple)
| -Z, --preference            |      Select from your remote attributes (e.g. xlogin)
| -J, --VO                    |      VO server URL
| -G, --voGroup               |      VO group
| -A, --attributeAssertion    |      File containing a VO attribute assertion
| -I, --includeAttributes     |      Filter VO attributes
| -Q, --excludeAttributes     |      Filter VO attributes
|================================


Configuration file
~~~~~~~~~~~~~~~~~~

[NOTE]
==================
Since UCC 6.6.0, the use of a configuration file is mandatory, since the possibility 
to specify options related to keystore and truststore on the command line 
have been removed
==================

By default, UCC checks for the existence of a file <userhome/.ucc/preferences> and reads
settings from there. As shown above, you can use a different file by specifiying
it on the commandline using the "-c" option.

The configuration file can contain default settings for many commandline options,
which are given in the form <option name>=<value>  where <option name> is the long
form of the option.

For example, to set your keystore, truststore and registry, the file would
contain the following settings
  
----------------------------
credential.path=<your keystore>
credential.password=XXXXXXX
truststore.type=keystore
truststore.keystorePath=<your keystore>
truststore.keystorePassword=XXXXXX
registry=https://localhost:8080/DEMO-SITE/services/Registry?res=default_registry
----------------------------

[NOTE]
==================
To protect your passwords, you should make the file non-readable by others,
for example on Unix using a command such as 'chmod 600 preferences'
==================

Communications options
~~~~~~~~~~~~~~~~~~~~~~

The configuration file may also contain low-level options, for example if you need to 
specify connection timeouts, http proxies etc. 


.HTTP options for the UCC
[options="header"]
|==============================
|option | description
|http.proxyHost  | HTTP(s) proxy to use
|http.proxyPort  | Port of the HTTP(s) proxy to use
|http.nonProxyHosts  | Space separated list of host name fragments for which NOT to go via the proxy. If the target URL contains such a fragment, it is accessed directly
|http.connection.timeout  | Timeout to use when establishing a HTTP connection
|http.sockettimeout  | Timeout to use when reading/writing from/to HTTP connection
|==============================

For example, to set the timeout when establishing a connection to 5 seconds, you would use

------------
http.connection.timeout=5000
------------

Other options
~~~~~~~~~~~~~

The following table lists other options, that are more rarely used.

.Other options for the UCC
[options="header"]
|==============================
|option | description
|contact-registry  | Do not attempt to contact the registry, even if one is configured
|==============================
