Advertisement
Guest User

Untitled

a guest
Aug 14th, 2017
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 21.70 KB | None | 0 0
  1. [scheduler_Worker-2] INFO org.jasig.cas.services.DefaultServicesManagerImpl - Loaded 9 services.
  2. Hibernate: select trim(password) from system_users where username=?
  3. [http-nio-8080-exec-3] INFO org.jasig.cas.authentication.PolicyBasedAuthenticationManager - QueryDatabaseAuthenticationHandler successfully authenticated test+password
  4. Hibernate: SELECT * FROM system_users WHERE username = ?
  5. [http-nio-8080-exec-3] INFO org.jasig.cas.authentication.PolicyBasedAuthenticationManager - Authenticated test with credentials [test+password].
  6. [http-nio-8080-exec-3] INFO com.github.inspektr.audit.support.Slf4jLoggingAuditTrailManager - Audit trail record BEGIN
  7. =============================================================
  8. WHO: audit:unknown
  9. WHAT: supplied credentials: [test+password]
  10. ACTION: AUTHENTICATION_SUCCESS
  11. APPLICATION: CAS
  12. WHEN: Wed Oct 28 09:55:46 GMT 2015
  13. CLIENT IP ADDRESS: 10.10.11.115
  14. SERVER IP ADDRESS: 10.10.11.113
  15. =============================================================
  16.  
  17.  
  18. [http-nio-8080-exec-3] INFO com.github.inspektr.audit.support.Slf4jLoggingAuditTrailManager - Audit trail record BEGIN
  19. =============================================================
  20. WHO: audit:unknown
  21. WHAT: TGT-1-Ogj40oX5SQRVr6AHdJkStF5Oo0S4ESB96ExrOkIaGmeQ2rFafi-cas01.example.org
  22. ACTION: TICKET_GRANTING_TICKET_CREATED
  23. APPLICATION: CAS
  24. WHEN: Wed Oct 28 09:55:46 GMT 2015
  25. CLIENT IP ADDRESS: 10.10.11.115
  26. SERVER IP ADDRESS: 10.10.11.113
  27. =============================================================
  28.  
  29.  
  30. [http-nio-8080-exec-3] WARN org.jasig.cas.CentralAuthenticationServiceImpl - ServiceManagement: Unauthorized Service Access. Service [http://localhost/app/j_spring_cas_security_check] is not found in service registry.
  31. [http-nio-8080-exec-3] INFO com.github.inspektr.audit.support.Slf4jLoggingAuditTrailManager - Audit trail record BEGIN
  32. =============================================================
  33. WHO: test
  34. WHAT: http://localhost/app/j_spring_cas_security_check
  35. ACTION: SERVICE_TICKET_NOT_CREATED
  36. APPLICATION: CAS
  37. WHEN: Wed Oct 28 09:55:46 GMT 2015
  38. CLIENT IP ADDRESS: 10.10.11.115
  39. SERVER IP ADDRESS: 10.10.11.113
  40. =============================================================
  41.  
  42.  
  43. [http-nio-8080-exec-5] WARN org.jasig.cas.CentralAuthenticationServiceImpl - ServiceManagement: Unauthorized Service Access. Service [http://localhost/app/j_spring_cas_security_check] is not found in service registry.
  44. [http-nio-8080-exec-5] INFO com.github.inspektr.audit.support.Slf4jLoggingAuditTrailManager - Audit trail record BEGIN
  45. =============================================================
  46. WHO: test
  47. WHAT: http://localhost/app/j_spring_cas_security_check
  48. ACTION: SERVICE_TICKET_NOT_CREATED
  49. APPLICATION: CAS
  50. WHEN: Wed Oct 28 09:55:50 GMT 2015
  51. CLIENT IP ADDRESS: 10.10.11.115
  52. SERVER IP ADDRESS: 10.10.11.113
  53. =============================================================
  54.  
  55. server.name=http://localhost:8080
  56. server.prefix=${server.name}/cas
  57. # IP address or CIDR subnet allowed to access the /status URI of CAS that exposes health check information
  58. cas.securityContext.status.allowedSubnet=127.0.0.1
  59.  
  60.  
  61. cas.themeResolver.defaultThemeName=cas-theme-default
  62. cas.viewResolver.basename=default_views
  63.  
  64. ##
  65. # Unique CAS node name
  66. # host.name is used to generate unique Service Ticket IDs and SAMLArtifacts. This is usually set to the specific
  67. # hostname of the machine running the CAS node, but it could be any label so long as it is unique in the cluster.
  68. host.name=cas01.example.org
  69.  
  70. ##
  71. # Database flavors for Hibernate
  72. #
  73. # One of these is needed if you are storing Services or Tickets in an RDBMS via JPA.
  74. #
  75. # database.hibernate.dialect=org.hibernate.dialect.OracleDialect
  76. # database.hibernate.dialect=org.hibernate.dialect.MySQLInnoDBDialect
  77. database.hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect
  78.  
  79. ##
  80. # CAS Logout Behavior
  81. # WEB-INF/cas-servlet.xml
  82. #
  83. # Specify whether CAS should redirect to the specified service parameter on /logout requests
  84. # cas.logout.followServiceRedirects=false
  85.  
  86. ##
  87. # Single Sign-On Session Timeouts
  88. # Defaults sourced from WEB-INF/spring-configuration/ticketExpirationPolices.xml
  89. #
  90. # Maximum session timeout - TGT will expire in maxTimeToLiveInSeconds regardless of usage
  91. # tgt.maxTimeToLiveInSeconds=28800
  92. #
  93. # Idle session timeout - TGT will expire sooner than maxTimeToLiveInSeconds if no further requests
  94. # for STs occur within timeToKillInSeconds
  95. # tgt.timeToKillInSeconds=7200
  96.  
  97. ##
  98. # Service Ticket Timeout
  99. # Default sourced from WEB-INF/spring-configuration/ticketExpirationPolices.xml
  100. #
  101. # Service Ticket timeout - typically kept short as a control against replay attacks, default is 10s. You'll want to
  102. # increase this timeout if you are manually testing service ticket creation/validation via tamperdata or similar tools
  103. # st.timeToKillInSeconds=10
  104.  
  105. ##
  106. # Single Logout Out Callbacks
  107. # Default sourced from WEB-INF/spring-configuration/argumentExtractorsConfiguration.xml
  108. #
  109. # To turn off all back channel SLO requests set slo.disabled to true
  110. # slo.callbacks.disabled=false
  111.  
  112. ##
  113. # Service Registry Periodic Reloading Scheduler
  114. # Default sourced from WEB-INF/spring-configuration/applicationContext.xml
  115. #
  116. # Force a startup delay of 2 minutes.
  117. # service.registry.quartz.reloader.startDelay=120000
  118. #
  119. # Reload services every 2 minutes
  120. # service.registry.quartz.reloader.repeatInterval=120000
  121.  
  122. ##
  123. # Log4j
  124. # Default sourced from WEB-INF/spring-configuration/log4jConfiguration.xml:
  125. #
  126. # It is often time helpful to externalize log4j.xml to a system path to preserve settings between upgrades.
  127. # e.g. log4j.config.location=/etc/cas/log4j.xml
  128. # log4j.config.location=classpath:log4j.xml
  129. #
  130. # log4j refresh interval in millis
  131. # log4j.refresh.interval=60000
  132.  
  133. ##
  134. # Password Policy
  135. #
  136. # Warn all users of expiration date regardless of warningDays value.
  137. password.policy.warnAll=false
  138.  
  139. # Threshold number of days to begin displaying password expiration warnings.
  140. password.policy.warningDays=30
  141.  
  142. # URL to which the user will be redirected to change the passsword.
  143. #password.policy.url=https://password.example.edu/change
  144. password.policy.url=http://fix.me
  145.  
  146. <?xml version="1.0" encoding="UTF-8"?>
  147.  
  148. <!--
  149. | deployerConfigContext.xml centralizes into one file some of the declarative configuration that
  150. | all CAS deployers will need to modify.
  151. |
  152. | This file declares some of the Spring-managed JavaBeans that make up a CAS deployment.
  153. | The beans declared in this file are instantiated at context initialization time by the Spring
  154. | ContextLoaderListener declared in web.xml. It finds this file because this
  155. | file is among those declared in the context parameter "contextConfigLocation".
  156. |
  157. | By far the most common change you will need to make in this file is to change the last bean
  158. | declaration to replace the default authentication handler with
  159. | one implementing your approach for authenticating usernames and passwords.
  160. +-->
  161.  
  162. <beans xmlns="http://www.springframework.org/schema/beans"
  163. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  164. xmlns:p="http://www.springframework.org/schema/p"
  165. xmlns:c="http://www.springframework.org/schema/c"
  166. xmlns:tx="http://www.springframework.org/schema/tx"
  167. xmlns:util="http://www.springframework.org/schema/util"
  168. xmlns:sec="http://www.springframework.org/schema/security"
  169. xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.2.xsd
  170. http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.2.xsd
  171. http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.2.xsd
  172. http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd">
  173.  
  174. <!--
  175. | The authentication manager defines security policy for authentication by specifying at a minimum
  176. | the authentication handlers that will be used to authenticate credential. While the AuthenticationManager
  177. | interface supports plugging in another implementation, the default PolicyBasedAuthenticationManager should
  178. | be sufficient in most cases.
  179. +-->
  180. <bean id="authenticationManager" class="org.jasig.cas.authentication.PolicyBasedAuthenticationManager">
  181. <constructor-arg>
  182. <map>
  183. <!--
  184. | IMPORTANT
  185. | Every handler requires a unique name.
  186. | If more than one instance of the same handler class is configured, you must explicitly
  187. | set its name to something other than its default name (typically the simple class name).
  188. -->
  189. <entry key-ref="proxyAuthenticationHandler" value-ref="proxyPrincipalResolver" />
  190. <entry key-ref="primaryAuthenticationHandler" value-ref="primaryPrincipalResolver" />
  191. </map>
  192. </constructor-arg>
  193.  
  194. <!-- Uncomment the metadata populator to allow clearpass to capture and cache the password
  195. This switch effectively will turn on clearpass.
  196. <property name="authenticationMetaDataPopulators">
  197. <util:list>
  198. <bean class="org.jasig.cas.extension.clearpass.CacheCredentialsMetaDataPopulator"
  199. c:credentialCache-ref="encryptedMap" />
  200. </util:list>
  201. </property>
  202. -->
  203.  
  204. <!--
  205. | Defines the security policy around authentication. Some alternative policies that ship with CAS:
  206. |
  207. | * NotPreventedAuthenticationPolicy - all credential must either pass or fail authentication
  208. | * AllAuthenticationPolicy - all presented credential must be authenticated successfully
  209. | * RequiredHandlerAuthenticationPolicy - specifies a handler that must authenticate its credential to pass
  210. -->
  211. <property name="authenticationPolicy">
  212. <bean class="org.jasig.cas.authentication.AnyAuthenticationPolicy" />
  213. </property>
  214. </bean>
  215.  
  216. <!-- Required for proxy ticket mechanism. -->
  217. <bean id="proxyAuthenticationHandler"
  218. class="org.jasig.cas.authentication.handler.support.HttpBasedServiceCredentialsAuthenticationHandler"
  219. p:httpClient-ref="httpClient"
  220. p:requireSecure="false"
  221. />
  222.  
  223. <!--
  224. | TODO: Replace this component with one suitable for your enviroment.
  225. |
  226. | This component provides authentication for the kind of credential used in your environment. In most cases
  227. | credential is a username/password pair that lives in a system of record like an LDAP directory.
  228. | The most common authentication handler beans:
  229. |
  230. | * org.jasig.cas.authentication.LdapAuthenticationHandler
  231. | * org.jasig.cas.adaptors.jdbc.QueryDatabaseAuthenticationHandler
  232. | * org.jasig.cas.adaptors.x509.authentication.handler.support.X509CredentialsAuthenticationHandler
  233. | * org.jasig.cas.support.spnego.authentication.handler.support.JCIFSSpnegoAuthenticationHandler
  234. -->
  235. <bean id="primaryAuthenticationHandler"
  236. class="org.jasig.cas.adaptors.jdbc.QueryDatabaseAuthenticationHandler">
  237. <property name="passwordEncoder">
  238. <bean
  239. class="org.jasig.cas.authentication.handler.DefaultPasswordEncoder">
  240. <constructor-arg value="MD5" />
  241. </bean>
  242. </property>
  243. <property name="dataSource" ref="dataSource" />
  244. <property name="sql" value="select trim(password) from system_users where username=?" />
  245. </bean>
  246.  
  247. <bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource">
  248. <property name="driverClassName" >
  249. <value>org.postgresql.Driver</value>
  250. </property>
  251. <property name="url">
  252. <value>jdbc:postgresql://m-test-db:5432/casdb</value>
  253. </property>
  254. <property name="username">
  255. <value>admin</value>
  256. </property>
  257. <property name="password">
  258. <value>qwe123</value>
  259. </property>
  260. </bean>
  261.  
  262.  
  263.  
  264.  
  265. <!-- Required for proxy ticket mechanism -->
  266. <bean id="proxyPrincipalResolver"
  267. class="org.jasig.cas.authentication.principal.BasicPrincipalResolver" />
  268.  
  269. <!--
  270. | Resolves a principal from a credential using an attribute repository that is configured to resolve
  271. | against a deployer-specific store (e.g. LDAP).
  272. -->
  273. <bean id="primaryPrincipalResolver"
  274. class="org.jasig.cas.authentication.principal.PersonDirectoryPrincipalResolver" >
  275. <property name="attributeRepository" ref="attributeRepository" />
  276. </bean>
  277.  
  278. <!--
  279. Bean that defines the attributes that a service may return. This example uses the Stub/Mock version. A real implementation
  280. may go against a database or LDAP server. The id should remain "attributeRepository" though.
  281. +-->
  282. <bean id="attributeRepository" class="org.jasig.services.persondir.support.jdbc.SingleRowJdbcPersonAttributeDao">
  283. <constructor-arg index="0" ref="dataSource" />
  284. <constructor-arg index="1" value="SELECT * FROM system_users WHERE {0}" />
  285. <property name="queryAttributeMapping">
  286. <map>
  287. <entry key="username" value="username" />
  288. </map>
  289. </property>
  290. <property name="resultAttributeMapping">
  291. <map>
  292. <entry key="username" value="username" />
  293. <entry key="first_name" value="FirstName" />
  294. <entry key="last_name" value="LastName" />
  295. <entry key="active" value="active" />
  296. </map>
  297. </property>
  298. </bean>
  299.  
  300. <util:map id="attrRepoBackingMap">
  301. <entry key="uid" value="uid" />
  302. <entry key="eduPersonAffiliation" value="eduPersonAffiliation" />
  303. <entry key="groupMembership" value="groupMembership" />
  304. </util:map>
  305.  
  306.  
  307. <bean class="org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor" />
  308. <bean id="serviceRegistryDao"
  309. class="org.jasig.cas.services.JpaServiceRegistryDaoImpl"
  310. /><!--
  311. p:entityManager-ref="entityManager"
  312. -->
  313. <!--
  314. <bean id="entityManager"
  315. factory-bean="entityManagerFactory"
  316. factory-method="getEntityManagerInterface"/>
  317. -->
  318. <bean id="entityManagerFactory"
  319. class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
  320.  
  321. <property name="dataSource" ref="dataSource"/>
  322. <property name="packagesToScan">
  323. <list>
  324. <value>org.jasig.cas.services</value>
  325. <value>org.jasig.cas.ticket</value>
  326. <value>org.jasig.cas.ticket.registry.support</value>
  327. </list>
  328. </property>
  329. <property name="jpaVendorAdapter">
  330. <bean class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter">
  331. <property name="generateDdl" value="true"/>
  332. <property name="showSql" value="true" />
  333. </bean>
  334. </property>
  335. <property name="jpaProperties">
  336. <props>
  337. <prop key="hibernate.dialect">org.hibernate.dialect.PostgreSQLDialect</prop>
  338. <prop key="hibernate.hbm2ddl.auto">update</prop>
  339. </props>
  340. </property>
  341. </bean>
  342.  
  343. <bean id="transactionManager"
  344. class="org.springframework.orm.jpa.JpaTransactionManager">
  345.  
  346. <property name="entityManagerFactory" ref="entityManagerFactory"/>
  347. </bean>
  348.  
  349. <tx:annotation-driven transaction-manager="transactionManager"/>
  350.  
  351. <util:list id="registeredServicesList">
  352. <bean class="org.jasig.cas.services.RegexRegisteredService"
  353. p:id="0" p:name="HTTP and IMAP" p:description="Allows HTTP(S) and IMAP(S) protocols"
  354. p:serviceId="^(http?|https?|imaps?):/.*" p:evaluationOrder="10000001" />
  355. <!--
  356. Use the following definition instead of the above to further restrict access
  357. to services within your domain (including sub domains).
  358. Note that example.com must be replaced with the domain you wish to permit.
  359. This example also demonstrates the configuration of an attribute filter
  360. that only allows for attributes whose length is 3.
  361. -->
  362. <!--
  363. <bean class="org.jasig.cas.services.RegexRegisteredService">
  364. <property name="id" value="1" />
  365. <property name="name" value="HTTP and IMAP on example.com" />
  366. <property name="description" value="Allows HTTP(S) and IMAP(S) protocols on example.com" />
  367. <property name="serviceId" value="^(https?|imaps?)://([A-Za-z0-9_-]+.)*example.com/.*" />
  368. <property name="evaluationOrder" value="0" />
  369. <property name="attributeFilter">
  370. <bean class="org.jasig.cas.services.support.RegisteredServiceRegexAttributeFilter" c:regex="^w{3}$" />
  371. </property>
  372. </bean>
  373. -->
  374. </util:list>
  375.  
  376. <bean id="auditTrailManager" class="com.github.inspektr.audit.support.Slf4jLoggingAuditTrailManager" />
  377.  
  378. <bean id="healthCheckMonitor" class="org.jasig.cas.monitor.HealthCheckMonitor" p:monitors-ref="monitorsList" />
  379.  
  380. <util:list id="monitorsList">
  381. <bean class="org.jasig.cas.monitor.MemoryMonitor" p:freeMemoryWarnThreshold="10" />
  382. <!--
  383. NOTE
  384. The following ticket registries support SessionMonitor:
  385. * DefaultTicketRegistry
  386. * JpaTicketRegistry
  387. Remove this monitor if you use an unsupported registry.
  388. -->
  389. <bean class="org.jasig.cas.monitor.SessionMonitor"
  390. p:ticketRegistry-ref="ticketRegistry"
  391. p:serviceTicketCountWarnThreshold="5000"
  392. p:sessionCountWarnThreshold="100000" />
  393. </util:list>
  394. </beans>
  395.  
  396. <?xml version="1.0" encoding="UTF-8"?>
  397. <project xmlns="http://maven.apache.org/POM/4.0.0"
  398. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  399. xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd ">
  400. <modelVersion>4.0.0</modelVersion>
  401. <groupId>net.unicon</groupId>
  402. <artifactId>cas-server</artifactId>
  403. <packaging>war</packaging>
  404. <version>1.0</version>
  405.  
  406. <properties>
  407. <hibernate.validator.version>4.2.0.Final</hibernate.validator.version>
  408. <hibernate.version>4.1.0.Final</hibernate.version>
  409.  
  410. <cas.version>4.0.0</cas.version>
  411. <maven.compiler.source>1.7</maven.compiler.source>
  412. <maven.compiler.target>1.7</maven.compiler.target>
  413. <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  414.  
  415. </properties>
  416.  
  417. <build>
  418. <plugins>
  419. <plugin>
  420. <groupId>org.apache.maven.plugins</groupId>
  421. <artifactId>maven-war-plugin</artifactId>
  422. <version>2.6</version>
  423. <configuration>
  424. <warName>cas</warName>
  425. <webResources>
  426. <resource>
  427. <directory>src/main/webapp/WEB-INF</directory>
  428. <filtering>true</filtering>
  429. <targetPath>WEB-INF</targetPath>
  430. </resource>
  431. </webResources>
  432. </configuration>
  433. </plugin>
  434. <plugin>
  435. <groupId>org.apache.maven.plugins</groupId>
  436. <artifactId>maven-compiler-plugin</artifactId>
  437. <version>3.3</version>
  438. <configuration>
  439. <source>${maven.compiler.source}</source>
  440. <target>${maven.compiler.target}</target>
  441. </configuration>
  442. </plugin>
  443.  
  444. </plugins>
  445. </build>
  446.  
  447. <dependencies>
  448.  
  449. <dependency>
  450. <groupId>org.jasig.cas</groupId>
  451. <artifactId>cas-server-webapp</artifactId>
  452. <version>${cas.version}</version>
  453. <type>war</type>
  454. <scope>runtime</scope>
  455. </dependency>
  456.  
  457. <dependency>
  458. <groupId>org.jasig.cas</groupId>
  459. <artifactId>cas-server-core</artifactId>
  460. <version>${cas.version}</version>
  461. </dependency>
  462.  
  463. <dependency>
  464. <groupId>org.jasig.cas</groupId>
  465. <artifactId>cas-server-support-jdbc</artifactId>
  466. <version>${cas.version}</version>
  467. </dependency>
  468.  
  469. <dependency>
  470. <groupId>org.postgresql</groupId>
  471. <artifactId>postgresql</artifactId>
  472. <version>9.4-1200-jdbc41</version>
  473. </dependency>
  474.  
  475. <dependency>
  476. <groupId>commons-dbcp</groupId>
  477. <artifactId>commons-dbcp</artifactId>
  478. <version>1.4</version>
  479. </dependency>
  480.  
  481. <dependency>
  482. <groupId>org.hibernate</groupId>
  483. <artifactId>hibernate-core</artifactId>
  484. <version>${hibernate.version}</version>
  485. <type>jar</type>
  486. </dependency>
  487.  
  488. <dependency>
  489. <groupId>org.hibernate</groupId>
  490. <artifactId>hibernate-entitymanager</artifactId>
  491. <version>${hibernate.version}</version>
  492. <type>jar</type>
  493. </dependency>
  494.  
  495. <dependency>
  496. <groupId>org.hibernate</groupId>
  497. <artifactId>hibernate-validator</artifactId>
  498. <version>${hibernate.validator.version}</version>
  499. </dependency>
  500.  
  501. </dependencies>
  502.  
  503. <repositories>
  504. <repository>
  505. <id>sonatype-releases</id>
  506. <url>http://oss.sonatype.org/content/repositories/releases/</url>
  507. </repository>
  508. <repository>
  509. <id>sonatype-snapshots</id>
  510. <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
  511. </repository>
  512. </repositories>
  513. </project>
  514.  
  515. <bean id="serviceRegistryDao"
  516. class="org.jasig.cas.services.InMemoryServiceRegistryDaoImpl"
  517. p:registeredServices-ref="registeredServicesList" />
  518. <util:list id="registeredServicesList">
  519. <bean class="org.jasig.cas.services.RegexRegisteredService"
  520. p:id="1"
  521. p:name="jason web application"
  522. p:serviceId="^(https?|imaps?|http?)://.*"
  523. p:evaluationOrder="0" />
  524. </util:list>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement