documentazione_3di_riservata:manuali_sysadmin:cas_installazione
Differenze
Queste sono le differenze tra la revisione selezionata e la versione attuale della pagina.
Entrambe le parti precedenti la revisioneRevisione precedente | |||
documentazione_3di_riservata:manuali_sysadmin:cas_installazione [2019/11/15 08:51] – [CAS su DB MONGO versione 6.0.5] mpascale | documentazione_3di_riservata:manuali_sysadmin:cas_installazione [Data sconosciuta] (versione attuale) – eliminata - modifica esterna (Data sconosciuta) 127.0.0.1 | ||
---|---|---|---|
Linea 1: | Linea 1: | ||
- | ====== CAS STANDALONE versione 5 ====== | ||
- | **Pacchetti che servono:** | ||
- | - Tomcat8 | ||
- | - JDK8 | ||
- | - CAS Overlay Template | ||
- | | ||
- | |||
- | 1.) **Prima di procedere con tutte le configurazioni si deve generare una chiave per il server CAS.** | ||
- | |||
- | Eseguire il seguente comando per generare la chiave: | ||
- | |||
- | '' | ||
- | |||
- | **Importante inserire nel nome e cognome il nome del server(hostname) oppure localhost** | ||
- | |||
- | 2.) **Attivare SSL su tomcat. Modifica server.xml: | ||
- | |||
- | <code xml> < | ||
- | maxThreads=" | ||
- | clientAuth=" | ||
- | keystoreFile="/ | ||
- | keystorePass=" | ||
- | truststoreFile="/ | ||
- | | ||
- | </ | ||
- | | ||
- | 3.) **Installazione CAS Overlay Template** | ||
- | |||
- | * Scarica CAS dal: [[https:// | ||
- | * Dopo aver scompattato il pacchetto eseguire il commando nella cartella del cas: | ||
- | |||
- | '' | ||
- | * Nella directory cas-overlay-master/ | ||
- | * In / | ||
- | * Modifica il / | ||
- | |||
- | < | ||
- | |||
- | cas.server.name=https:// | ||
- | cas.server.prefix=https:// | ||
- | |||
- | cas.host.name=localhost | ||
- | server.context-path=/ | ||
- | server.port=8443 | ||
- | |||
- | server.ssl.key-store=file:/ | ||
- | server.ssl.key-store-password=changeit | ||
- | server.ssl.key-password=changeit | ||
- | |||
- | |||
- | management.contextPath=/ | ||
- | management.security.enabled=true | ||
- | management.security.roles=ACTUATOR, | ||
- | management.security.sessions=if_required | ||
- | |||
- | cas.adminPagesSecurity.ip=127\.0\.0\.1 | ||
- | logging.config=file:/ | ||
- | |||
- | cas.serviceRegistry.watcherEnabled=true | ||
- | cas.serviceRegistry.repeatInterval=120000 | ||
- | cas.serviceRegistry.startDelay=15000 | ||
- | cas.serviceRegistry.initFromJson=true | ||
- | cas.serviceRegistry.config.location=file:/ | ||
- | |||
- | # | ||
- | cas.authn.accept.users= | ||
- | # | ||
- | |||
- | cas.authn.file.separator=:: | ||
- | cas.authn.file.filename=file:/// | ||
- | cas.serviceRegistry.initFromJson=true | ||
- | </ | ||
- | |||
- | * Per autentificare tramite una lista file TXT, si deve mettere la dependency nel file pom.xml. | ||
- | * Scaricare nel cas/ | ||
- | * Ricorda di copiare il codice della dependecy come suggerito nel sito maven | ||
- | |||
- | <code xml> | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | < | ||
- | </ | ||
- | </ | ||
- | |||
- | * Aggiungere nel webapps/ | ||
- | |||
- | <code xml>< | ||
- | < | ||
- | < | ||
- | < | ||
- | </ | ||
- | |||
- | * Crea file json in / | ||
- | |||
- | <code xml> | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | } | ||
- | } | ||
- | </ | ||
- | |||
- | **Attenzione!** //Il nome del file deve essere name-id.json come specificato nello script.// | ||
- | ====== CAS su DB MONGO versione 6.0.5 ====== | ||
- | |||
- | == Prerequisiti == | ||
- | * MongoDB | ||
- | * Tomcat8 | ||
- | * openjdk11 | ||
- | |||
- | == Compilazione == | ||
- | |||
- | Si parte dal progetto cas overlay template [[https:// | ||
- | |||
- | Bisogna aggiungere le dipendenze di gradle nel file build.gradle | ||
- | <code java build.grandle> | ||
- | ... | ||
- | dependencies { | ||
- | compile " | ||
- | compile " | ||
- | compile " | ||
- | compile " | ||
- | compile " | ||
- | // compile " | ||
- | // Other CAS dependencies/ | ||
- | |||
- | } | ||
- | ... | ||
- | </ | ||
- | |||
- | Compilare con <code bash> | ||
- | All' | ||
- | |||
- | == Configurazione == | ||
- | Copiare le configurazioni base con <code bash> | ||
- | |||
- | Editare i file in / | ||
- | <code properties cas.properties> | ||
- | cas.server.name=https:// | ||
- | cas.server.prefix=${cas.server.name}/ | ||
- | |||
- | logging.config: | ||
- | |||
- | |||
- | # Lasciare la seguente property vuota per avere l autenticazione su mongo | ||
- | cas.authn.accept.users= | ||
- | |||
- | |||
- | | ||
- | | ||
- | | ||
- | # Auto-initialize the registry from default JSON service definitions | ||
- | | ||
- | # cas.serviceRegistry.managementType=DEFAULT|DOMAIN | ||
- | # | ||
- | cas.serviceRegistry.json.location=file:/ | ||
- | |||
- | ########################################################### | ||
- | #### MONGO PASSWORD ENCODING - encoding delle password #### | ||
- | ########################################################### | ||
- | cas.authn.mongo.passwordEncoder.type=BCRYPT | ||
- | # cas.authn.mongo.passwordEncoder.characterEncoding= | ||
- | # cas.authn.mongo.passwordEncoder.encodingAlgorithm= | ||
- | # cas.authn.mongo.passwordEncoder.secret= | ||
- | cas.authn.mongo.passwordEncoder.strength=10 | ||
- | ############################################################## | ||
- | #### MONGO USER STRUCTURE - mapping struttura dati utente #### | ||
- | ############################################################## | ||
- | cas.authn.mongo.attributes=first_name, | ||
- | cas.authn.mongo.usernameAttribute=username | ||
- | cas.authn.mongo.passwordAttribute=password | ||
- | # cas.authn.mongo.principalIdAttribute= | ||
- | # cas.authn.mongo.name= | ||
- | ################################################################## | ||
- | #### MONGO AUTHN - connessione a mongo per autenticazione cas #### | ||
- | ################################################################## | ||
- | # cas.authn.mongo.host=localhost | ||
- | cas.authn.mongo.clientUri=mongodb:// | ||
- | # cas.authn.mongo.idleTimeout=30000 | ||
- | # cas.authn.mongo.port=27017 | ||
- | # cas.authn.mongo.dropCollection=false | ||
- | # cas.authn.mongo.socketKeepAlive=false | ||
- | # cas.authn.mongo.password= | ||
- | # Depending on the feature at hand, CAS may decide to dynamically create its own collections and ignore this setting. | ||
- | cas.authn.mongo.collection=users | ||
- | cas.authn.mongo.databaseName=cas | ||
- | # cas.authn.mongo.timeout=5000 | ||
- | # cas.authn.mongo.userId= | ||
- | # cas.authn.mongo.writeConcern=NORMAL | ||
- | # cas.authn.mongo.authenticationDatabaseName= | ||
- | # cas.authn.mongo.replicaSet= | ||
- | # cas.authn.mongo.sslEnabled=false | ||
- | # cas.authn.mongo.conns.lifetime=60000 | ||
- | # cas.authn.mongo.conns.perHost=10 | ||
- | ################################################## | ||
- | ### MONGO TICKETIING - salvataggio ticketing | ||
- | ################################################## | ||
- | # cas.ticket.registry.mongo.host=localhost | ||
- | cas.ticket.registry.mongo.clientUri=mongodb:// | ||
- | # cas.ticket.registry.mongo.idleTimeout=30000 | ||
- | # cas.ticket.registry.mongo.port=27017 | ||
- | # cas.ticket.registry.mongo.dropCollection=false | ||
- | # cas.ticket.registry.mongo.socketKeepAlive=false | ||
- | # cas.ticket.registry.mongo.password= | ||
- | # Depending on the feature at hand, CAS may decide to dynamically create its own collections and ignore this setting. | ||
- | # se si decommenta questa SI SPACCA | ||
- | # perchè tickets estende direttamente BaseMongoDbProperties e non SingleCollectionMongoDbProperties | ||
- | # cas.ticket.registry.mongo.collection=cas-tickets | ||
- | cas.ticket.registry.mongo.databaseName=cas | ||
- | # cas.ticket.registry.mongo.timeout=5000 | ||
- | # cas.ticket.registry.mongo.userId= | ||
- | # cas.ticket.registry.mongo.writeConcern=NORMAL | ||
- | # cas.ticket.registry.mongo.authenticationDatabaseName= | ||
- | # cas.ticket.registry.mongo.replicaSet= | ||
- | # cas.ticket.registry.mongo.sslEnabled=false | ||
- | # cas.ticket.registry.mongo.conns.lifetime=60000 | ||
- | # cas.ticket.registry.mongo.conns.perHost=10 | ||
- | ############################################## | ||
- | #### MONGO AUDIT - auditing degli accessi #### | ||
- | ############################################## | ||
- | # cas.events.mongo.host=localhost | ||
- | cas.events.mongo.clientUri=mongodb:// | ||
- | # cas.events.mongo.idleTimeout=30000 | ||
- | # cas.events.mongo.port=27017 | ||
- | # cas.events.mongo.dropCollection=false | ||
- | # cas.events.mongo.socketKeepAlive=false | ||
- | # cas.events.mongo.password= | ||
- | # Depending on the feature at hand, CAS may decide to dynamically create its own collections and ignore this setting. | ||
- | cas.events.mongo.collection=audits | ||
- | cas.events.mongo.databaseName=cas | ||
- | # cas.events.mongo.timeout=5000 | ||
- | # cas.events.mongo.userId= | ||
- | # cas.events.mongo.writeConcern=NORMAL | ||
- | # cas.events.mongo.authenticationDatabaseName= | ||
- | # cas.events.mongo.replicaSet= | ||
- | # cas.events.mongo.sslEnabled=false | ||
- | # cas.events.mongo.conns.lifetime=60000 | ||
- | # cas.events.mongo.conns.perHost=10 | ||
- | ############################################################################### | ||
- | #### MONGO SERVICE REGISTRY - persistenza delle configurazioni dei service #### | ||
- | ############################################################################### | ||
- | # cas.serviceRegistry.mongo.host=localhost | ||
- | # | ||
- | # cas.serviceRegistry.mongo.idleTimeout=30000 | ||
- | # cas.serviceRegistry.mongo.port=27017 | ||
- | # cas.serviceRegistry.mongo.dropCollection=false | ||
- | # cas.serviceRegistry.mongo.socketKeepAlive=false | ||
- | # cas.serviceRegistry.mongo.password= | ||
- | # Depending on the feature at hand, CAS may decide to dynamically create its own collections and ignore this setting. | ||
- | # | ||
- | # | ||
- | # cas.serviceRegistry.mongo.timeout=500 | ||
- | # cas.serviceRegistry.mongo.userId= | ||
- | # cas.serviceRegistry.mongo.writeConcern=NORMAL | ||
- | # cas.serviceRegistry.mongo.authenticationDatabaseName= | ||
- | # cas.serviceRegistry.mongo.replicaSet= | ||
- | # cas.serviceRegistry.mongo.sslEnabled=false | ||
- | # cas.serviceRegistry.mongo.conns.lifetime=60000 | ||
- | # cas.serviceRegistry.mongo.conns.perHost=10 | ||
- | |||
- | cas.logout.followServiceRedirects=true | ||
- | |||
- | </ | ||
- | |||
- | In log4j2.xml modificare solo la baseDir | ||
- | <code xml> | ||
- | ... | ||
- | < | ||
- | ... | ||
- | </ | ||
- | Creare una cartella services in /etc/cas/ creare i file per i servizi come da esempio: | ||
- | <code json CollaudoEc-10000001.json> | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | } | ||
- | </ | ||
- | <WRAP center round info 60%> | ||
- | Il nome del file deve fare match con il name e l'id all' | ||
- | </ | ||
- | Volendo si può usare un template generico per fare sempre match | ||
- | <code json allservices-101.json> | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | } | ||
- | } | ||
- | </ | ||
- | |||
- | Per personalizzare i temi bisogna creare un file di properties in .../ | ||
- | <code java ec.properties> | ||
- | cas.standard.css.file=/ | ||
- | cas.javascript.file=/ | ||
- | </ | ||
- | All' | ||
- | <code bash> | ||
- | total 8 | ||
- | drwxr-x--- 5 cas cas 4096 Oct 29 15:45 apereo | ||
- | drwxr-x--- 5 cas cas 4096 Oct 29 15:45 ec | ||
- | </ | ||
- | |||
- | == Gestione utenti == | ||
- | All' | ||
- | <code json> | ||
- | { | ||
- | " | ||
- | " | ||
- | " | ||
- | " | ||
- | } | ||
- | </ | ||
- | |||
- | Le password possono essere generate online qui [[https:// |
/data/attic/documentazione_3di_riservata/manuali_sysadmin/cas_installazione.1573804307.txt.gz · Ultima modifica: 2019/11/15 08:51 da mpascale