I want to upload attachments to a page in Confluence in a post build action using a pipeline job.
I downloaded the Confluence Publisher plugin. Im trying to use my email id as username and API Token as password to test login. (tried with both http and https)
Keeps giving Authentication Error (401)
I tried from postman with same token and username (Auth method as API Authentication). Works like a charm.
What am I doing wrong?
Had the same problem here with version 0.12.0.
Problem is fixed for me with changing to version 0.17.1
Related
I am trying to test my web application using JMeter which is protected by keycloak IDP. But when I try to login using the credentials the login fails saying "Please login from the client" and keycloak logs on the server says:
2021-04-16 11:10:05,316 WARN [org.keycloak.events] (default task-400) type=LOGIN_ERROR, realmId=my-realm, clientId=null, userId=null, ipAddress=10.x.x.x, error=invalid_code
attaching the screenshot of the request I recorded using Blazemeter chrome plugin, some parameters are being sent, any idea how could we configure this?
login URL :
https://Server_Address/auth/realms/my-realm/login-actions/authenticate?session_code=iXAkZuEnl25URJPfaSd8kaTdnwCqz5CY-pZoZUb33ns&execution=0e502d98-b482-4abc-a7a5-c31d06b1f9c2&client_id=my_client&tab_id=Fa8Ggyqw3tk
Unfortunately you won't be able to just record and successfully replay your scenario without prior correlation of the dynamic parameters.
These execution and tab_id and session_code guys are something you're getting as generated when you're being redirected to Keycloak instance which authenticates the user so you need to extract these values from the previous response and replace recorded hard-coded bullshit you get with the dynamic parameters
The easiest way to extract the values is using Boundary Extractor
Also these parameters should go in query string, not in the request body
Demo:
I'm using https://github.com/jenkinsci/ghprb-plugin plugin for my Jenkins to initiate job build when pull request is raised.
I'm getting below error
"Unable to connect to GitHub API: org.kohsuke.github.HttpException: {"message":"Requires authentication","documentation_url":"https://docs.github.com/rest/reference/users#get-the-authenticated-user"}"
Tried with multiple user on 2 different Jenkins, issue remains same.
Right now you are using github username and password. But you need to use github access token instead of password for authentication. You can create an access token from settings -> Developer Settings -> Personal Access tokens -> Generate new token.
I have created a PAT token for my user account in TFS Server 2017 (on-premises, not VSTS). Using Postman I am attempting to call the following REST API with Basic Auth:
GET http://{server:port}/tfs/DefaultCollection/_apis/projects?api-version=1.0
In response I get the following error:
TF401444: Please sign-in at least once as {Well Known SID for my user account} in a web browser to enable access to the service. - Microsoft Team Foundation Server
I have tried opening the same URL in Chrome and attempting to login with the PAT but with no success (the login is not completed). Any suggestions as to what I am missing here?
TFS seems to be recognising the PAT token as I receive a different error if I revoke it.
The issue here was the use of 'DefaultCollection' in the URI. I didn't have permissions on the default project collection in our TFS instance and needed to replace 'DefaultCollection' with the name of the collection I actually did have access to.
It seems obvious now, but the documentation didn't make it clear that this was a variable part of the URI so I had assumed the API was always hosted as part of the DefaultCollection.
I am trying integrate Devops with another 3rd part system, but i tried to access Devops from postman using oAuth2.0, but it is always failing, throwing me a error {"Error":"invalid_client","ErrorDescription":"Invalid client auth token."}
Does Devops support oAuth? if so what i am missing so i got this error?
The problem is that DevOps is using non standard headers for some reason. This causes the built in postman to not work. The way that I figured out to work around this is to input the Auth url directly into your browser. You can then extract the auth code from the callback URL.
Then with that code, make a post to the token endpoint in postman
https://app.vssps.visualstudio.com/oauth2/token
Use x-www-form-urlencoded body and fill out the following keys
"client_assertion_type", "urn:ietf:params:oauth:client-assertion-type:jwt-bearer"
"client_assertion", your app secret
"grant_type", "urn:ietf:params:oauth:grant-type:jwt-bearer"
"assertion", your auth code from previous step
"redirect_uri", your callbackurl
Azure DevOps supports oAuth. If you follow the steps in the link below to get an oAuth token, and type the token directly in Postman, you'll get a successful response:
https://github.com/Microsoft/azure-devops-auth-samples/tree/master/OAuthWebSample
I have a REST service that is running on https://localhost:9090.
In order to provide token based authentication with Oauth2.0 for consumers of my REST service, I have cloned the 4.2 version of CAS from repository https://github.com/leleuj/cas-pac4j-oauth-demo and deployed only cas2.war (cas server) on tomcat 7. From the browser, I hit this URL :
https://localhost:8443/cas2/login?response_type=code&client_id=this_is_the_key&redirect_uri=https%3A%2F%2Flocalhost%3A9090%2Fv1%2Ffiles%2Fafb2265b-39e9-4172-bccc-e3f43700874e
I got the cas login page and after the successful login with valid credentials (leleuj::leleuj), I was not redirected to my service api as mentioned in the URL. Instead, the browser still shows the success cas login page. Is there something wrong in what I am doing? Sorry if this is a basic question, I am somewhat new to CAS.
As I'm leleuj on github, it feels a question for me ;-) Indeed, this doesn't work running mvn jetty:run, but if you run the webapps in Tomcat, it works, I haven't investigated more as CAS 5 is out now!