// This module is included in the following assemblies:
// as_connecting-to-jira.adoc

[id='creating-jira-connections_{context}']
= Creating a Jira connection

In an integration, to obtain, create, or update a Jira issue, create a 
Jira connection, which you then add to an integration. You can add the 
same connection to any number of integrations. 

If the Jira server that you want to connect to uses the OAuth protocol 
for authenticating access, you must have registered your {prodname} 
environment as a client of the Jira server that you want to connect to. See 
link:{LinkSyndesisConnectorGuide}#registering-with-jira_jira[Registering {prodname} with a Jira server that uses OAuth]. 

.Prerequisites
* For a Jira server that uses basic authentication, you have a Jira 
user name and password.
* For a Jira server that uses OAuth, you have access to the `config.properties` file
that contains values for the Jira 
access token, consumer key, private key, and verification code. 

.Procedure

. In {prodname}, in the navigation panel, click *Connections* to
display any available connections.
. Click *Create Connection* to display
the available connectors. 
. Click the *Jira* connector.

. In the *Jira URL* field, enter the URL for the Jira server that 
you want an integration to connect to, 
for example, `*https://issues.mycompany.org*`.
+
For a connection to a Jira server uses OAuth, the procedure to register
your {prodname} environment as a Jira consumer application resulted in 
a `config.properties` file. The URL 
that you specify here should be the same URL that is in that `config.preperties` 
file. For example, you would see 
a line like this in the `config.properties` file: 
+
----
jira_home=https\:issues.mycompany.org
----

. If this Jira server uses basic authentication: 
.. In the *User name* field, enter a Jira user name. The connection 
uses this account to operate on the specified Jira server. 
.. In the *Password* field, enter the specified user's password. 

+ 
Skip the next step if the Jira server does not use OAuth authentication. 
. If the Jira server uses OAuth authentication: 
.. Open the `config.properties` file that contains the OAuth 
access token, keys, and verification code. This is the file that is the 
result of the registration procedure. Copy values from that file
and paste them into the connection configuration fields.
.. Copy the `access_token` value into the *Access Token* field. 
.. Copy the `consumer_key` value into the *Consumer Key* field. 
.. Copy the `private_key` value into the *Private Key* field.
.. Copy the `secret` value into the *Verification Code* field. 
  
. Click *Validate*. {prodname} displays a message that indicates whether
it can validate this connection. If validation fails, try again and 
be sure to enter the correct values. 
. When validation is successful, click *Next*.
. In the *Name* field, enter your choice of a name that
helps you distinguish this connection from any other connections.
For example, enter `*Jira Connect 1*`.
. In the *Description* field, optionally enter any information that
is helpful to know about this connection. For example,
enter `*Sample Jira connection
that uses the jkim account.*`
. Click *Save* to see that the connection you
created is now available. If you entered the example name, you would
see that *Jira Connect 1* appears as a connection that you can 
choose to add to an integration.
