Project

General

Profile

Actions

Task #1952

closed

SSO support for both windows and linux servers

Added by Marcel Poul over 4 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
High
Assignee:
Radek Tomiška
Category:
Authentication / Authorization
Target version:
Start date:
11/21/2019
Due date:
% Done:

100%

Estimated time:
Owner:

Description

The aim of this ticket is to find a way of using SSO via Kerberos protocol. The solution must work on both windows and linux servers (where the idm is installed).

Actions #2

Updated by Marcel Poul over 4 years ago

  • Priority changed from Normal to High
Actions #5

Updated by Radek Tomiška over 4 years ago

Hi Honza,
could you please translate your private comment and made it public to see some progress in ticket?
We have whole request available in application, so new authentication filter can be implemented.

Actions #6

Updated by Jan Kolařík over 4 years ago

Tomcat and kerberos findings:

Tests were carried out in virtual machines "klon Patrik - GFR simulace testovani SSO HONZA" (172.31.255.169) and 172.31.255.181 (Windows DC).

Domain username can be gained in kerberized tomcat e.g. by this JSP code:

<%= new String("Hello!") %>
<br>
<%= request.getRemoteUser() %>
<br>
<%= request.getUserPrincipal() %>
<br> 

Output:

Hello!
 honza
 GenericPrincipal[honza(CN=idmusers,CN=Users,DC=lopaticka,DC=piskoviste,DC=bcv,idmusers,)]

Is it possible to adjust application to use username from methods getRemoteUser() or getUserPrincipal() instead of the login form ?

The similar feature already exists when the username is in HTTP header.
It can be activated by these configuration parameters:

idm.sec.core.authentication-filter.core-sso-authentication-filter.enabled=true
idm.sec.core.authentication-filter.core-sso-authentication-filter.header-name=REMOTE_USER
idm.sec.core.authentication-filter.core-sso-authentication-filter.uid-suffixes=@COMPANY.CZ

Actions #7

Updated by Jan Kolařík over 4 years ago

Actions #8

Updated by Radek Tomiška over 4 years ago

  • Target version set to Rhyolite (9.7.13)

I will implement new authentication filter - this implementation will be provided to test in your environment.

Actions #9

Updated by Radek Tomiška over 4 years ago

  • Status changed from New to In Progress
  • Assignee changed from Jan Kolařík to Radek Tomiška
Actions #10

Updated by Radek Tomiška over 4 years ago

  • Status changed from In Progress to Needs feedback
  • Assignee changed from Radek Tomiška to Jan Kolařík
  • % Done changed from 0 to 70

Authentication filter by remote user is implemeted, commit:
https://github.com/bcvsolutions/CzechIdMng/commit/1a072285ccc743fc512658ac605f7b9e94984bec

Doc:
https://wiki.czechidm.com/devel/documentation/application_configuration/dev/backend#remote_user_authentication_filter

Integration test provided and tested localy by simple tomcat valve configuration. Configuration is almost the same as core-sso-authentication-filter, but all users can be logged (app_admin too).

Could you test this new filter in your environment, please? Code review will be done after.

Note: hotfix branch (link above) has to be built and deployed.

Actions #11

Updated by Jan Kolařík over 4 years ago

Hi Radek,
could you please provide me with the WAR file ? Thank you.

Actions #13

Updated by Jan Kolařík over 4 years ago

I don't know why, but when I tried to download the above mentioned app-9.7.13-20191202.091422-1.war file from Nexus I got the error: "Filter undefined (maven-snapshots) not found".

But after couple tries and attemtps I succeeded to build the war file. I tested idm app with these additional settings:

idm.sec.core.authentication-filter.core-remote-user-authentication-filter.enabled=true
idm.sec.core.authentication-filter.core-remote-user-authentication-filter.uid-suffixes=@LOPATICKA.PISKOVISTE.BCV
#idm.sec.core.authentication-filter.core-remote-user-authentication-filter.forbid

I confirm that login into application works based on the username in serverlet.

Actions #14

Updated by Radek Tomiška over 4 years ago

Login into nexus is needed to read snapshots. But it's great, if you was able to build it.

Can we do a code review and close this ticket?

Actions #15

Updated by Jan Kolařík over 4 years ago

Yes, I consider this feature completed, thanks. Please perform the code review and close the ticket.

Actions #16

Updated by Radek Tomiška over 4 years ago

  • Assignee changed from Jan Kolařík to Vít Švanda
  • % Done changed from 70 to 90
Actions #17

Updated by Vít Švanda over 4 years ago

I did review. Looks simple and great. Thanks for that.

Actions #18

Updated by Radek Tomiška over 4 years ago

  • Status changed from Needs feedback to Resolved
  • Assignee changed from Vít Švanda to Radek Tomiška
  • % Done changed from 90 to 100
Actions #19

Updated by Radek Tomiška over 4 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF