Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Hudson » Hudson Central Authentication Service(Interface Hudson to the standard cas 3)
Hudson Central Authentication Service [message #1729742] Mon, 18 April 2016 15:47 Go to next message
huson cas3 is currently offline huson cas3Friend
Messages: 2
Registered: April 2016
Junior Member
Hi everybody,

I'm working for a client. This client uses Hudson for Continuous Integration and wants to authenticate users through the standard Central Authentication Service (CAS). So I try to develop a plugin to add to Hudson in order to set up the CAS.
I began to develop a plugin from the existing plugin "cas1". It's the first time I develop a plugin for Hudson. And I created a java class extending "SecurityRealm". So when I launch Hudson and go to the Hudson management -> Manage Security, I choose the CAS security (my new plugin) and enter the cas URL, the Hudson HostName URL and save it. The sign-up link appears at the top in the rigth of the page.
I want to redirect the page to the CAS authentication page when the user clicks on the sign-up link.
How can I do that ? Any idea... ?
I try' to modify the HTML code (<a onclick="showLoginDialog(); return false;" href="/login?from=%2F">) in order to avoid the display of the basic authentication dialog box of Hudson.
Someone can help me ?
Re: Hudson Central Authentication Service [message #1729924 is a reply to message #1729742] Wed, 20 April 2016 09:43 Go to previous messageGo to next message
huson cas3 is currently offline huson cas3Friend
Messages: 2
Registered: April 2016
Junior Member
I managed to redirect Hudson authentication to the CAS authentication page, overriding the method "getLoginUrl()":

@Override
public String getLoginUrl() {
    return casServerUrl;
}


and adding my own "loginLink.jelly" file in the package "resources/myCasSecurityRealm". And in this file, I replaced the link:

<a style="color:inherit" href="${rootURL}/${app.securityRealm.loginUrl}?from=${from}"><b>${%login}</b></a>


by

<a style="color:inherit" href="${app.securityRealm.loginUrl}"><b>${%login}</b></a>


Now, when I click on the sign-up link, my CAS authentication page is displayed.
Re: Hudson Central Authentication Service [message #1729992 is a reply to message #1729924] Wed, 20 April 2016 17:27 Go to previous message
Winston Prakash is currently offline Winston PrakashFriend
Messages: 534
Registered: August 2011
Location: Fremont, CA USA
Senior Member
Glad you found out how to do it yourself. I was about to suggest you to take a look at Google Login plugin developed by Kaz Nishimura

https://bitbucket.org/kazssym/hudson-google-login-plugin/src



Winston Prakash
Eclipse Hudson team
Previous Topic:Team based Authorization Strategy not work after restart, hudson3.3.3, centos6.7
Next Topic:Hudson 3.0.0 + Active Directory
Goto Forum:
  


Current Time: Wed Oct 09 14:14:28 GMT 2024

Powered by FUDForum. Page generated in 0.02917 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top