SpecSync Documentation
Jira
Jira
  • Introduction to SpecSync for Jira
  • Getting started
    • Getting started using SpecFlow
    • Getting started using Cucumber or other Gherkin-based BDD tool
  • Installation & Setup
    • Install as .NET tool
    • Install as .NET Console App
    • Install as native binaries for Linux or macOS
    • Install as Docker image
    • Setup and Configure
  • Features
    • Push features
      • Pushing scenario changes to Test Cases
      • Configuring the format of the synchronized test cases
      • Synchronizing Scenario Outlines
      • Update Test Case fields
      • Attach files to Test Cases using tags
      • Customization: Setting Test Case fields with default values
      • Customization: Update custom Test Case fields on push
      • Customization: Ignoring marked Test Case steps
      • Customization: Ignoring Test Case Tags
      • Customization: Ignore non-supported local tags
      • Customization: Mapping tags
      • Customization: Synchronizing scenarios from feature branches
      • Customization: Automatically link changed Test Cases
      • Customization: Synchronize linked artifact titles
      • Customization: Do not synchronize title
    • Pull features
      • Pulling Test Case changes to local scenarios
    • Common synchronization features
      • Configuration key
      • Remote scope
      • Linking Work Items using tags
      • Synchronizing Test Case hierarchies
      • Excluding scenarios from synchronization
      • Synchronization conflict resolution
    • Test result publishing features
      • Publishing test result files
    • General features
      • Jira authentication options
      • Configuration file
      • Hierarchical configuration files
      • Local test case conditions
      • Configuration wizards
      • SpecSync plugins
    • Customizations
    • Plugin list
  • Licensing
  • Guides
    • What is my Jira server URL?
    • Jira Test Case Management (TCM) solution
    • How to define the local feature-set to be synchronized
    • Filters and scopes
    • How to use SpecSync from build or release pipeline
    • How to upgrade to a newer version of SpecSync
    • How to attach files to test results
    • Using SpecSync with Cucumber
    • Using SpecSync with Cypress
    • Using SpecSync with Postman
    • Using SpecSync with TestNG
    • Using SpecSync on macOS or Linux
    • Using SpecSync inside a Docker container
    • Migrating from SpecSync v1 to v5
  • Changelog
  • Release Model and Roadmap
  • Downloads
  • Reference
    • Command line reference
      • init
      • upgrade
      • push
      • pull
      • publish-test-results
      • version
    • Configuration reference
      • toolSettings
      • local
      • remote
      • jira
      • knownRemotes
      • synchronization
        • push
        • pull
        • links
        • attachments
        • format
        • fieldUpdates
      • hierarchies
      • publishTestResults
      • specFlow
      • customizations
    • Compatibility
    • Older versions
  • Contact
    • SpecSync Support
    • Troubleshooting
    • FAQ
  • Project Website
Powered by GitBook
On this page
  • Examples
  • Permissions required for users used by SpecSync
  • Jira API Token
  • Personal access tokens
  • User name and password

Was this helpful?

  1. Features
  2. General features

Jira authentication options

PreviousGeneral featuresNextConfiguration file

Last updated 1 year ago

Was this helpful?

SpecSync supports several authentication options for the . This section provides a summary of how the different authentication options have to be configured:

For Jira Cloud:

For Jira Server or Data Center:

The authentication credentials can be specified in multiple ways:

  1. During the execution of the SpecSync command using the interactive prompt (password is masked). This method is used by SpecSync if either the user name (token) or the password is not configured anywhere else.

  2. Using the --user and --password .

  3. In the of the (specsync.json).

  4. In the .

  5. In system environment variables that can be referred to either in the configuration file or from the command prompt (see examples below). The environment variable name has to be specified using the {env:ENV_VAR} format (%ENV_VAR% format is also accepted for backwards compatibility).

Examples

Specifying the user name in the specsync.json configuration file:

specsync.json
{
  ...
 "remote": {
    "serverUrl": "https://specsyncdemo.atlassian.net/",
    "project": "MyCalculator",
    "user": "account01"
  },
  ...
}

Specifying the user name in the command line:

dotnet specsync push --user "account01"
specsync.json (in C:\Users\my_user\AppData\SpecSync folder)
{
  "$schema": "http://schemas.specsolutions.eu/specsync-user-config-latest.json",

  "knownRemotes": [
    {
      "projectUrl": "https://dev.azure.com/myorg/*",
      "user": "g2x.....................ac2vx57i4a"
    },
    {
      "projectUrl": "https://dev.azure.com/otherorg/OtherProject",
      "user": "y6s.....................ksuc7tsts"
    }
  ]
}

Specifying the user credentials that refer to an environment variable in the specsync.json configuration file. The example requires the user name to be stored in the environment variable SPECSYNC_REMOTE_USER:

specsync.json
{
  ...
 "remote": {
    "serverUrl": "https://specsyncdemo.atlassian.net/",
    "project": "MyCalculator",
    "user": "{env:SPECSYNC_REMOTE_USER}"
  },
  ...
}

You can also use the environment variables without the shell resolving their values. For that, specify the value in the {env:ENV_VAR} format.

dotnet specsync push --user "{env:SPECSYNC_REMOTE_USER}"

Permissions required for users used by SpecSync

SpecSync creates and manages Test Cases in Jira. Therefore to be able to operate it needs to have

  • read/write access for the Test Case issue type

  • read access for other issue types the Test Cases are linked to.

More specifically, the following Project permissions are required:

  • Browse Projects

  • View Read-Only Workflow

The following Issue permissions are required:

  • Assign Issues (only if you plan to update the assigned to field)

  • Close Issues (only if you plan to update the issue state field)

  • Create Issues

  • Edit Issues

  • Link Issues

  • Modify Reporter (only if you plan to update the related field)

  • Resolve Issues (only if you plan to update the issue state field)

  • Schedule Issues (only if you plan to update the due date field)

  • Transition Issues (only if you plan to update the issue state field)

The following Comments permissions are required:

  • Add Comments

The following Attachments permissions are required:

  • Create Attachments

Jira API Token

The following example authenticates using the email address account01@mycompany.com and API token Kyu4Wl3twFAa9cAWklTCB476

specsync.json
{
  ...
 "remote": {
    "serverUrl": "https://specsyncdemo.atlassian.net/",
    "project": "MyCalculator",
    "user": "account01@mycompany.com",
    "password": "Kyu4Wl3twFAa9cAWklTCB476"
  },
  ...
}

Personal access tokens

The following example authenticates using the PAT AGT2OTk3NjMxNDQyOlBfg4kDgqKreys6v0FzrcDBZR89

specsync.json
{
  ...
 "remote": {
    "serverUrl": "http://myjiraserver:9090/",
    "project": "MyCalculator",
    "user": "AGT2OTk3NjMxNDQyOlBfg4kDgqKreys6v0FzrcDBZR89"
  },
  ...
}

User name and password

In order to connect to Jira Server or Jira DataCenter with SpecSync, you can authenticate yourself with user name and password.

The following example specifies the user name account01 in the configuration file.

specsync.json
{
  ...
  "remote": {
    "serverUrl": "http://myjiraserver:9090/",
    "project": "MyCalculator",
    "user": "account01"
  },
  ...
}

A that configures credentials for multiple projects.

In order to connect to Jira Cloud with SpecSync, you can authenticate yourself with Jira API tokens. For that you need to create an API Token in Jira Cloud (see ) and then specify your email address as user name and the token as password.

In order to connect to Jira Server or Jira DataCenter with SpecSync, you can authenticate yourself with Personal Access Tokens (PAT). For that you need to create a PAT in Jira Server (see instructions in the section "Creating PATs in the application" of the ) and then use that as user name without specifying a password.

It is not recommended to include the password to the configuration file. If you don't specify your password, SpecSync will ask for it using an interactive prompt. Alternatively you can consider using or environment variables.

instructions
Jira Documentation page
personal access tokens
remote section
SpecSync configuration file
API Token
Personal access tokens
User name and password
supported Jira systems
user-specific configuration file
user-specific configuration file
command line options