Giter Site home page Giter Site logo

java-spring-security-cas-client-demo's People

Contributors

leleuj avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

java-spring-security-cas-client-demo's Issues

Can this code block work without enabling ssl in the client ?

I am trying to use client demo combining with the virtual cas server exampled as : https://github.com/ubc/vagrant-cas. I have updated client securityContext.xml as below:

<sec:http use-expressions="true" entry-point-ref="casEntryPoint">
	<sec:intercept-url pattern="/protected/**" access="isAuthenticated()" />
	<sec:intercept-url pattern="/**" access="permitAll" />
	<sec:custom-filter position="CAS_FILTER" ref="casFilter" />
	<!-- Handle CAS logout request from the browser (on /j_spring_security_logout): -->
	<sec:logout />
	<!-- Handle CAS logout directly from the CAS server: -->
	<sec:custom-filter before="CAS_FILTER" ref="singleLogoutFilter" />
</sec:http>

<bean id="casFilter"
	class="org.springframework.security.cas.web.CasAuthenticationFilter">
	<property name="authenticationManager" ref="authenticationManager" />
</bean>

<bean id="singleLogoutFilter" class="org.jasig.cas.client.session.SingleSignOutFilter" />

<bean id="casEntryPoint"
	class="org.springframework.security.cas.web.CasAuthenticationEntryPoint">
	<!-- Change with your own CAS server -->
	<property name="loginUrl"
		value="http://192.168.33.10/cas/login" />
	<property name="serviceProperties" ref="serviceProperties" />

</bean>
<bean id="serviceProperties" class="org.springframework.security.cas.ServiceProperties">
	<!-- Change with your own host name -->
	<property name="service"
		value="http://localhost:8080/j_spring_cas_security_check" />
</bean>

<sec:authentication-manager alias="authenticationManager">
	<sec:authentication-provider ref="casAuthenticationProvider" />
</sec:authentication-manager>

<bean id="casAuthenticationProvider"
	class="org.springframework.security.cas.authentication.CasAuthenticationProvider">
	<property name="authenticationUserDetailsService">
		<bean
			class="org.springframework.security.core.userdetails.UserDetailsByNameServiceWrapper">
			<constructor-arg ref="userService" />
		</bean>
	</property>
	<property name="serviceProperties" ref="serviceProperties" />
	<property name="ticketValidator">
		<bean class="org.jasig.cas.client.validation.Cas20ServiceTicketValidator">
			<!-- Change with your own CAS server -->
			<constructor-arg index="0"
				value="http://192.168.33.10/cas/p3/" />
		</bean>
	</property>
	<property name="key" value="an_id_for_this_auth_provider_only" />
</bean>

<sec:user-service id="userService">
	<sec:user name="scott" password="casuser" authorities="ROLE_ADMIN" />
</sec:user-service>

I can not login with the user scott. As far as I can see the client app server jetty does not have any ssl certificate and https://wiki.jasig.org/display/casum/end-to-end+windows+example#End-to-endWindowsExample-DeploytheServer this tutorial says that both client and server sides should have the ssl certificates. Can the problem be related to this issue?

Thank you in advance

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.