Sonarqube logout issue with SSO Authentication as HTTP headers - sonarqube

I have a problem with logout API. I use SSO Authentication as HTTP headers mode. I can login successfully but when I want to logout. It keeps me login in Sonarqube server.
Sonarqube version 6.7

By definition, when you're using the HTTP authentication header, the login/logout is delegated to your reverse proxy, or any tool you're using to set the HTTP headers.
Please have a look at the documentation for more info about this feature.

Related

JwtAuthenticationToken is not being saved to HttpSessionSecurityContextRepository: spring authorization server 0.4.0, spring 5.7

I am using spring authorization server for oauth2 authentication, with resource server configuration for handling authentication outside of the server. My use case is as follows:
user makes a request to authorize end point
since the session is not authenticated, system caches the request and redirect the user to an external end point for authentication.
Once authentication is successful external system creates a short lived jwt token.
Jwt token is sent to authorization server, which it will validate and redirect the request to the saved previous request (which is the authorize end point call in step 1)
Since the jwt token was authenticated, I want the authorize call to succeed this time.
With spring version 5.6, the securitycontextholder was able to save the authentication, and any subsequent requests in the same session was able to use the jwtauthentication. Now since the transient check is added on the HttpSessionSecurityContextRepository.java, jwtauthentication is not saved between requests and my functionality is broken.
How can I handle this scenario? I would like to use the jwt authentication from an external source in conjunction with spring authorization server. Any suggestions are appreciated.
I already have checked a similar question- JwtAuthenticationToken is not being saved to HttpSessionSecurityContextRepository after upgrading to 5.7 version which didnt have any inputs. I also have checked the github discussions for both spring 5.7 release and authorization server 0.4.0 release and was not able to find any guides.

How to handle cookies with Azure AD authentication, Apache Reverse Proxy and Tomcat?

I have an Angular App with a Spring Boot Backend. I use "azure-active-directory-spring-boot-starter" for the authentication via Azure AD. Everything works fine locally.
After the successful external (azure) login "https://local.../login/oauth2/code/azure?code=..." is called.
The request headers on this request contain authorization cookies from azure and the response header contains two "set-cookie"-entries: JSESSIONID, XSRF-TOKEN
After that request the user is logged in as expected.
With the production setup however it seems, that cookies are not set successfully.
The application runs on a Tomcat 9 behind a apache reverse proxy. The azure login itself is successful.
Also the request headers contain the two cookies, however "set-cookie" is not set. Any ideas how to solve this?

How to test login based on Keycloak test using JMeter?

We have an app that has a keycloak login. I want to create a JMeter test that logs in using some credential than do some stuff. the problem is I don't know how to form the POST URL
https://something.something.something.something/auth/realms/test/login-actions/authenticate?session_code=D3XPlFteuLSReLVsPbmCYY8RwqJDPmxb9JI1dBtR1yk&execution=021d7cc9-048c-4f68-a295-6d145597dd8e&client_id=my-react-client&tab_id=ACD97a5Yb50”
How to get the other parameters for the Post URL inside the test. They are not in the previous HTTP response (accessing the login page) and there are not in the cookies. I know how to get only the client_id.
Keycloak supports 2 authentication protocols:
OpenID Connect
SAML 2.0
Looking into your URL it's utterly like that your Keycloak instance is using OpenID and looking into OpenID Configuration Options
client-id: <CLIENT_ID>
# the secret associated to the 'client' application
So my expectation is that this is something which doesn't change so feel free to keep it as my-react-client
Just in case get familiarized with OpenID Connect - How to Load Test with JMeter to learn more about the concept of bypassing login challenge in JMeter tests when it comes to external authentication providers.

No 'Access-Control-Allow-Origin' header is present on the requested resources SAML Federation

i have this problem in production enviromment, it's happened because i'm trying to redirect user to federation to authenticate,
i'm using SAML authentication && IBM IHS
console log of cors
Are you using ADFS? Where is it in the picture?
ADFS does not handle CORS and there is no way to add this header.
You need to do this via a proxy.

JMeter authentication error : 401

Currently I am having problem to login my application using Jmeter scripts for SSO login.Shows unauthorized but all my credentials that I provided to login into application are okay.
It was working earlier.
I have already implemented each and everything that require to run Jmeter to my application earlier.
Currently I am stuck at this point.If anyone has idea? If so it would be so nice to have that idea/help.
check if it is NTLM authentication then you need to provide Mechanism as "Basic Digest" and if any domain then mention in Realm as "{domainname}\"
Most probably this is due to irrelevant configuration of the HTTP Authorization Manager
Looking into WWW-Authenticate Negotiate, it seems application you are testing is using NTLM or Kerberos authentication so you need to properly configure JMeter in order to be able to bypass it.
See Windows Authentication with Apache JMeter article for more detailed explanation and example configurations for NTLM and Kerberos.

Resources