View symlink-tree.txt
View SymlinkTest.java
package com.example;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import java.io.BufferedReader;
import java.io.File;
import java.io.IOException;
import java.io.InputStreamReader;
View system.conf.properties
[Manager]
# Limit maximum of open files
DefaultLimitNOFILE=65535
View limits.conf.sh
#<domain> <type> <item> <value>
guido soft nofile 2048
guido hard nofile 10240
View SamlBootstrapInit.java
@Bean
public static SAMLBootstrap samlBootstrap() {
// return new SAMLBootstrap();
return new SamlBootstrapSha256();
}
View SamlBootstrapSha256.java
public class SamlBootstrapSha256 extends SAMLBootstrap {
@Override
public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory)
throws BeansException {
super.postProcessBeanFactory(beanFactory);
BasicSecurityConfiguration config =
(BasicSecurityConfiguration) Configuration.getGlobalSecurityConfiguration();
View SamlKeyStore.java
@Bean
public KeyManager keyManager() {
DefaultResourceLoader loader = new DefaultResourceLoader();
Resource storeFile = loader.getResource("classpath:/saml/samlKeystore.jks");
String storePass = "secure";
Map<String, String> passwords = new HashMap<>();
passwords.put("samuraj", "secure");
String defaultKey = "samuraj";
return new JKSKeyManager(storeFile, storePass, passwords, defaultKey);
View SamlMetadataFilterChainComplete.java
@Bean
public FilterChainProxy samlFilter() throws Exception {
List<SecurityFilterChain> chains = new ArrayList<SecurityFilterChain>();
chains.add(new DefaultSecurityFilterChain(
new AntPathRequestMatcher("/saml/login/**"),
samlEntryPoint()));
chains.add(new DefaultSecurityFilterChain(
new AntPathRequestMatcher("/saml/logout/**"),
samlLogoutFilter()));
View SamlHttpSecurity.java
@Configuration
@EnableWebSecurity
public class SecurityConfiguration extends WebSecurityConfigurerAdapter {
@Override
protected void configure(HttpSecurity http) throws Exception {
http.csrf()
.disable();
http
.addFilterBefore(metadataGeneratorFilter(), ChannelProcessingFilter.class)
View saml-dependencies-build.gradle
ext {
springVersion = '5.0.2.RELEASE'
springSecurityVersion = '5.0.0.RELEASE'
springSamlVersion = '1.0.3.RELEASE'
}
dependencies {
implementation "org.springframework:spring-webmvc:${springVersion}"
implementation "org.springframework.security:spring-security-web:${springSecurityVersion}"
implementation "org.springframework.security:spring-security-config:${springSecurityVersion}"