My school has a CAS system that handle all the college student login activity. I am building a webapp that will go to one of the school website that has all the deadlines information of homework, and download those deadlines for me. However, in order to do so, I will need to first login with CAS then go to the website and get things. I am wondering how can I use my school's cas login for my own webapp?
Here is my idea so far:
my website --> redirect to my school's cas page ----> somehow cas page will return some credentials to my website ----> with that credentials my website can go to another school's website and download stuffs.
I am not sure if my idea is right and I do not know how to get credential from cas page either. I would really appreciate any help!
Thanks!
First, you need to declare your web app in the CAS services management (you need some admin role here). Therefore, you will benefit from the regular CAS authentication process.
Then, if you want to get "stuffs" from another web app and use your first web app as a CAS proxy, you will need to setup the appropriate configuration. Take a look at : https://wiki.jasig.org/display/CAS/Proxy+CAS+Walkthrough to see if it matches your need.
Related
Basically, the title says it all.
More & more students at our school are asking for a way to authenticate through our Microsoft environment for their own school projects/web applications.
So, we are willing to listen to that and build an universal login system. We need a system (preferably with an App registration in the Azure portal) that allows logins to Microsoft on our organization. Then, after logging in, we want it to redirect to any students site (on the same domain) and authenticate to that.
Important to note, most of the students use PHP for their web applications. The use of the Graph API is not required, but would be cool.
So, is there any possibility for that? If so, how would we do that?
To achieve the above requirement You will need to modify your PHP web application code to redirect to your any students site post authentication with Azure AD.
Thus to authenticate with Azure AD you will need to include the Azure AD Authentication assembly in your pHp website code . For example you can refer this GitHub sample
Once the above has been done then you will need to register an application in AzureAD for your php webapplication and configure the web application redirect url and call back url accordingly .
Further you will need to add redirection uri for the student websites in the php webapplication code itself and ensure that the student websites are hosted as subdomain website for the php web application itself.
For more information please refer this MICROSOFT DOCUMENTATION:- Integrating with the Microsoft identity platform
slightly losing my mind here and I would really like some help to get me pointed in the right direction.
I'm using a shared Linux server on GoDaddy where I have two PHP websites with separate user logins authenticating with two separate MySQL databases. What I'd like is for a user to log into Site 1 and then be automatically logged into Site 2. And when they logout out of either site, they should be logged out of both sites.
I currently have SimpleSAMLphp installed and I'd really appreciate some guidance on how to setup the IdP and SPs. Am I right in thinking that the Site 1 and Site 2 are the SP's?
Any guidance would be greatly appreciated, this is my first ever SSO setup and I'm just a little lost.
To implement single sign on you need somthing common in both website to authenticate. Cookies won't help as there are two different site and it is not good to expose your cookies to a another website.
In general, SSO is implemented using a central serevr basically which handles the authentication data.
Basic steps are as follows:
For login, user is redirected to the common server and credentials get verified.
Central server sets the cookie for the login.
When your other website needs a login it checks the central server again using redirection.
Then, central server check the cookies and authenticates or redirect to login if not aythenticated before.
So, you can configure a central authentication server which check authentication and provide the appropriate response and both websites handle it accordingly.
But, Central server needs a common user database which in your case you clearly lack. So you can declare one of the websites as central or principle resource and expose APIs for other website which will expose its user base to verify the details.
Let one website handle the login process. If other needs authentication to be done it will redirect user to the main website and then handle the return response.
There is a lot to cover in theory but hope it would help.
Useful links:
Building and implementing a Single Sign-On solution
Basics of Single Sign on (SSO)
I am making a website for a school, the website is made with Wordpress.
The school has a local (server ?) made with ADFS where they can sign in. I have the need to have a page on the website called 'intranet' where if the user is singed in on the server of the school they should be auto-logged in on the website and see the files on that adfs server. The company responsible for this server will provide me with a link of some sort.
I have found a Wordpress Plugin called: SAML 2.0 single sign on.
https://wordpress.org/plugins/saml-20-single-sign-on/
But from my understanding this plugin is replacing the admin login with a single-sign-on, which is not really what i want to do (or do i?). There should be a separate login-form on a specific webpage only.
I have zero knowledge of ADFS, what i know about it is from wikipedia:
Active Directory Federation Services (ADFS or AD FS), a software
component developed by Microsoft, can run on Windows Server operating
systems to provide users with single sign-on access to systems and
applications located across organizational boundaries.
Question
My actual question: Since i don't have any knowledge in this matter, i would like to have some tips on how to start with this, what do i need to learn, and what do i have to google to learn relevant information about this? Maybe a little step-by-step guide to get me started? Any help would be greatly appreciated!
Also, how is the user information handled? Do i need to have a ssl certificate or is that handled on the side of ADFS?
Refer : ADFS Single Sign On with WordPress.
ADFS authenticates against AD.
What will happen is that you go to WordPress, you will be redirected to the ADFS login page, you authenticate and then get redirected back to WordPress with a collection of claims (AD attributes). These can include roles.
You can't alter this behaviour.
Yes you need an SSL certificate on the ADFS side but since ADFS is already installed, it must already exist.
For a good overview, refer : A Guide to Claims-Based Identity and Access Control.
My question is not deeply technical but more of a system architectural one.
I'm designing an API backend in Go Lang. I'd like to have several clients, like a web server, cell phones etc.. I imagine that all these clients should have a secret API key so to validate that they can use the API. At the same time the web frontend is going to have a lot of users with different restrictions. I'd like for these users to be able to log in with their facebook or Google account. That should require OAuth authentication as I understand. My question is now where should I add the OAuth. Only in the frontend and then save the user in session or also between the frontend and the backend. I'm highly confused about how I should set up this communication and authentication.
I'm building the web server in PHP and I'd like the web frontend to be really light weight and more or less only function as en empty shell/view for the Go API. I've build systems in plain PHP/MySQL before but I'd like to make a shift to Go based APIs.
How would a URI look like to the API from the web server frontend for let's say a show profile page? I imagine something like a GET call to "http.//backend.com:3000/[api-key]/[api-secret][oauth-token?]/profile. Then some middleware to authenticate the web client and another piece of middleware to authenticate the user. Would that be "the right" approach?
I hope you guys can point me in the right direction.
Thanks in advance.
If you look at your facebook or google developer docs, you will find examples on how to integrate with their oauth login systems.
OAuth, or at least the last step of it, really must be done on the back end as you have to assume your front end is a bad guy hitting your system.
For go oauth, take a look at: https://github.com/golang/oauth2
You will likely have a http.HandlerFunc("/oauth/google",yourGoogleFunc)
and http.HandlerFunc("/oauth/facebook",yourFBFunc)
type thing, then you register that URL on your dev account with those companies.
while testing, it's easiest to use localhost:8080 (or whatever) as the callback url so it works on any machine as long as you are using a local browser.
So my scenario goes like :
I have two sites a.com and site b.com and one authentication server cauth.com.
what client wants is ...
When user lands on a.com or b.com user fills in the login form on respective site , but the action of form will be on cauth.com (cauth.com/authenticate). when user is authenticated on cauth he is loggined on the both sites.
I am thinking to implement SAML to achieve the same and flow is like
after authentication iDP(cauth.com) will send SAML response to the both the service providers and user will be given access to both the sites .
I am novice in SAML and unable to get proper documentation and comprehension for the same.
What I want to know is :
Is my solution to the problem worth implementation ?
Is it possible to make site (cauth.com) as identity provider.I have looked at thread Making your PHP website into SAML Identity Provider but not able to get proper solution.
SimpleSamlPHP should be pretty easy to set up. You'll want to make a copy of the folder modules/exampleauth/ and then alter the file modules/<yournewmodule>/lib/Auth/Source/External.php to work for your site. The documentation is good though and it's definitely the easiest thing for your need, and the right one.
I should add that following the instructions to set up SimpleSamlPHP should give you a basic understanding of which metadata files are most important and where they live and how things interact.
I am not sure which technology you are using for your application. If you are free to switch to JAVA then I can suggest you Spring-Saml because its very easy to implement and fulfill your requirement. Spring-Saml has good documentation and online support as well being it as open-source project.
You can refer this link for Spring-saml and for code-repo use this link
You can integrate spring-saml in your abc.com and xyz.com application to make it Service provider(SP) and you can deploy it on different domain as well. Then you need to have one IDP (identity provider server) for your SPs. So you can use either ADFS with Active directory or LDAP to act as IDP.
We had similar requirement for our customer. I recently integrated spring-saml in my project.
Please let me know for any help
A federated Single Sign On (SSO) mechanism like SAML or OpenID Connect will give you what you want.
This comes with the important distinction that the login form would not be presented on a.com or b.com but those sites would rather redirect to cauth.com and the user would authenticate there. cauth.com would then send a verifiable "assertion" to a.com and b.com that the user has authenticated successfully. This constitutes one of the major goals of federated SSO, namely that the user credentials should not be presented/stored-by foreign websites and makes the means of authentication independent from the target websites ("Relying Parties").
So what you should be looking for is a suitable implementation of SAML or OpenID Connect for your platform (don't write it yourself!) and leverage that.
Shibboleth is open source and one of the most popular SSO solutions. It includes a SAML Identity Provider which you can download here: https://shibboleth.net/downloads/identity-provider/latest/ .
If your client is willing, one approach would be to use a cloud SSO provider like Okta which has a developer program and could make things easier.
I think there is a subtle misunderstanding in your description. For SAML authentication, if a user at site a.com either clicks a login link/button or tries to access a secure page, that user will receive an http 305 redirect to cauth.com. There the user will enter their credentials, and the user will be redirected back to a.com. If that user then goes to site b.com and tries to access secure content, b.com sends the user to cauth.com with the same http 305 redirect. This time, as there is an active session for the user's browser at cauth.com, the user does NOT see the credential form. Instead, the IDP returns the user with a successful authentication to b.com. It appears to the user that they are automatically logged on to site b, but in truth a SAML authentication flow has occurred.
Hans Z's answer elides the fact the that IDP only sends the assertions on the request of a or b (the Relying parties or RPs, also known as Service Providers or SPs). It is not a broadcast to all RPs.
I'll reinforce that SAML does NOT support a.com receiving the credentials from the user and then passing them to the authentication engine. This is a pattern one may be familiar with from LDAP.
Take a look at the sequence diagram in the wikipedia entry on SAML.
Follow below instruction to get SAML implimentation with PHP.
SAML login setup is very easy in php.
First register on onelogin server
https://www.onelogin.com/signup and create demo app on it. After
it follow all instruction to set Idp (Identity provider setting ) and
sp (service provider setting) to settings.php
https://developers.onelogin.com/saml/php
It worked perfect for me with CI and and php