Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auth with JIRA access token #66

Open
JuergenLandt opened this issue Jun 18, 2021 · 6 comments
Open

Auth with JIRA access token #66

JuergenLandt opened this issue Jun 18, 2021 · 6 comments
Labels
enhancement New feature or request

Comments

@JuergenLandt
Copy link

JuergenLandt commented Jun 18, 2021

As an alternative to login with user and password, login with a token should be possible.

[api] host = "jira.example.com" ; port = 443 ; path = "/" ; scheme = "https" ; username = "icinga" ; password = "***" token = "****************************************************"

@theFeu theFeu added the enhancement New feature or request label Mar 29, 2022
@verboEse
Copy link

verboEse commented Feb 8, 2023

AFAIC, you don't need to provide a password when using the Jira-token. In our setup, it's sufficient to configure the token in the password field.

@Littlericket
Copy link

@verboEse Unfortunately, no.
image

@verboEse
Copy link

verboEse commented Jun 11, 2024

Sorry, I wasn't clear. You have to provide the username of course. But you only have to provide either password OR token. Both can be provided in the password field.

@Littlericket
Copy link

@verboEse I don't think that this will work on Server deployments, since the authorization is done via bearer-token (PAT or access token) and not basic-auth. For RestApi (https://github.com/Icinga/icingaweb2-module-jira/blob/main/library/Jira/RestApi.php#L434), there needs to be an addition to use the bearer token, like (for example)

        if($config_setting == "bearer-token") {
            $auth = null;
            $headers[] = "Authorization: Bearer ".$token;
        }

@theFeu maybe this is an interesting addition? For the config form, there can be an autosubmit for the type of authorization, username/password or via token. This will switch adding the above mentioned header and removes the basic-authentication. Instead of storing username / password, you will only store the access token.

@theFeu
Copy link
Contributor

theFeu commented Jun 12, 2024

Heyhey, I'm no longer active in this project.

@raviks789 might be a better person to ask!

@raviks789
Copy link
Contributor

raviks789 commented Jun 12, 2024

@Littlericket,I am currently occupied with other projects. And I am not sure if this will be included in the next release. But I will look into this later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants