diff --git a/openid-connect-server-webapp/src/main/webapp/WEB-INF/data-context.xml b/openid-connect-server-webapp/src/main/webapp/WEB-INF/data-context.xml deleted file mode 100644 index 67d8bd146..000000000 --- a/openid-connect-server-webapp/src/main/webapp/WEB-INF/data-context.xml +++ /dev/null @@ -1,128 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/openid-connect-server-webapp/src/main/webapp/WEB-INF/server-config.xml b/openid-connect-server-webapp/src/main/webapp/WEB-INF/server-config.xml deleted file mode 100644 index 544f01c98..000000000 --- a/openid-connect-server-webapp/src/main/webapp/WEB-INF/server-config.xml +++ /dev/null @@ -1,77 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/openid-connect-server-webapp/src/main/webapp/WEB-INF/tags/copyright.tag b/openid-connect-server-webapp/src/main/webapp/WEB-INF/tags/copyright.tag deleted file mode 100644 index 4b0aa920a..000000000 --- a/openid-connect-server-webapp/src/main/webapp/WEB-INF/tags/copyright.tag +++ /dev/null @@ -1,4 +0,0 @@ -<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%> -<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> - - diff --git a/openid-connect-server/src/main/java/org/mitre/openid/connect/web/EndSessionEndpoint.java b/openid-connect-server/src/main/java/org/mitre/openid/connect/web/EndSessionEndpoint.java deleted file mode 100644 index 26055501a..000000000 --- a/openid-connect-server/src/main/java/org/mitre/openid/connect/web/EndSessionEndpoint.java +++ /dev/null @@ -1,197 +0,0 @@ -/******************************************************************************* - * Copyright 2018 The MIT Internet Trust Consortium - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - *******************************************************************************/ - -package org.mitre.openid.connect.web; - -import java.text.ParseException; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import javax.servlet.http.HttpSession; - -import org.mitre.jwt.assertion.AssertionValidator; -import org.mitre.jwt.assertion.impl.SelfAssertionValidator; -import org.mitre.oauth2.model.ClientDetailsEntity; -import org.mitre.oauth2.service.ClientDetailsEntityService; -import org.mitre.openid.connect.model.UserInfo; -import org.mitre.openid.connect.service.UserInfoService; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.security.core.Authentication; -import org.springframework.security.core.context.SecurityContextHolder; -import org.springframework.security.oauth2.common.exceptions.InvalidClientException; -import org.springframework.security.web.authentication.logout.SecurityContextLogoutHandler; -import org.springframework.stereotype.Controller; -import org.springframework.ui.Model; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.util.UriComponents; -import org.springframework.web.util.UriComponentsBuilder; -import org.springframework.web.util.UriUtils; - -import com.google.common.base.Strings; -import com.google.common.collect.Iterables; -import com.nimbusds.jwt.JWT; -import com.nimbusds.jwt.JWTClaimsSet; -import com.nimbusds.jwt.JWTParser; - -/** - * Implementation of the End Session Endpoint from OIDC session management - * - * @author jricher - * - */ -@Controller -public class EndSessionEndpoint { - - public static final String URL = "endsession"; - - private static final String CLIENT_KEY = "client"; - private static final String STATE_KEY = "state"; - private static final String REDIRECT_URI_KEY = "redirectUri"; - - private static Logger logger = LoggerFactory.getLogger(EndSessionEndpoint.class); - - @Autowired - private SelfAssertionValidator validator; - - @Autowired - private UserInfoService userInfoService; - - @Autowired - private ClientDetailsEntityService clientService; - - @RequestMapping(value = "/" + URL, method = RequestMethod.GET) - public String endSession(@RequestParam (value = "id_token_hint", required = false) String idTokenHint, - @RequestParam (value = "post_logout_redirect_uri", required = false) String postLogoutRedirectUri, - @RequestParam (value = STATE_KEY, required = false) String state, - HttpServletRequest request, - HttpServletResponse response, - HttpSession session, - Authentication auth, Model m) { - - // conditionally filled variables - JWTClaimsSet idTokenClaims = null; // pulled from the parsed and validated ID token - ClientDetailsEntity client = null; // pulled from ID token's audience field - - if (!Strings.isNullOrEmpty(postLogoutRedirectUri)) { - session.setAttribute(REDIRECT_URI_KEY, postLogoutRedirectUri); - } - if (!Strings.isNullOrEmpty(state)) { - session.setAttribute(STATE_KEY, state); - } - - // parse the ID token hint to see if it's valid - if (!Strings.isNullOrEmpty(idTokenHint)) { - try { - JWT idToken = JWTParser.parse(idTokenHint); - - if (validator.isValid(idToken)) { - // we issued this ID token, figure out who it's for - idTokenClaims = idToken.getJWTClaimsSet(); - - String clientId = Iterables.getOnlyElement(idTokenClaims.getAudience()); - - client = clientService.loadClientByClientId(clientId); - - // save a reference in the session for us to pick up later - //session.setAttribute("endSession_idTokenHint_claims", idTokenClaims); - session.setAttribute(CLIENT_KEY, client); - } - } catch (ParseException e) { - // it's not a valid ID token, ignore it - logger.debug("Invalid id token hint", e); - } catch (InvalidClientException e) { - // couldn't find the client, ignore it - logger.debug("Invalid client", e); - } - } - - // are we logged in or not? - if (auth == null || !request.isUserInRole("ROLE_USER")) { - // we're not logged in anyway, process the final redirect bits if needed - return processLogout(null, request, response, session, auth, m); - } else { - // we are logged in, need to prompt the user before we log out - - // see who the current user is - UserInfo ui = userInfoService.getByUsername(auth.getName()); - - if (idTokenClaims != null) { - String subject = idTokenClaims.getSubject(); - // see if the current user is the same as the one in the ID token - // TODO: should we do anything different in these cases? - if (!Strings.isNullOrEmpty(subject) && subject.equals(ui.getSub())) { - // it's the same user - } else { - // it's not the same user - } - } - - m.addAttribute("client", client); - m.addAttribute("idToken", idTokenClaims); - - // display the log out confirmation page - return "logoutConfirmation"; - } - } - - @RequestMapping(value = "/" + URL, method = RequestMethod.POST) - public String processLogout(@RequestParam(value = "approve", required = false) String approved, - HttpServletRequest request, - HttpServletResponse response, - HttpSession session, - Authentication auth, Model m) { - - String redirectUri = (String) session.getAttribute(REDIRECT_URI_KEY); - String state = (String) session.getAttribute(STATE_KEY); - ClientDetailsEntity client = (ClientDetailsEntity) session.getAttribute(CLIENT_KEY); - - if (!Strings.isNullOrEmpty(approved)) { - // use approved, perform the logout - if (auth != null){ - new SecurityContextLogoutHandler().logout(request, response, auth); - } - SecurityContextHolder.getContext().setAuthentication(null); - // TODO: hook into other logout post-processing - } - - // if the user didn't approve, don't log out but hit the landing page anyway for redirect as needed - - - - // if we have a client AND the client has post-logout redirect URIs - // registered AND the URI given is in that list, then... - if (!Strings.isNullOrEmpty(redirectUri) && - client != null && client.getPostLogoutRedirectUris() != null) { - - if (client.getPostLogoutRedirectUris().contains(redirectUri)) { - // TODO: future, add the redirect URI to the model for the display page for an interstitial - // m.addAttribute("redirectUri", postLogoutRedirectUri); - - UriComponents uri = UriComponentsBuilder.fromHttpUrl(redirectUri).queryParam("state", state).build(); - - return "redirect:" + uri; - } - } - - // otherwise, return to a nice post-logout landing page - return "postLogout"; - } - -} diff --git a/openid-connect-server-webapp/.gitignore b/perun-oidc-server-webapp/.gitignore similarity index 100% rename from openid-connect-server-webapp/.gitignore rename to perun-oidc-server-webapp/.gitignore diff --git a/openid-connect-server-webapp/pom.xml b/perun-oidc-server-webapp/pom.xml similarity index 71% rename from openid-connect-server-webapp/pom.xml rename to perun-oidc-server-webapp/pom.xml index be9e63a13..8163fe1c4 100644 --- a/openid-connect-server-webapp/pom.xml +++ b/perun-oidc-server-webapp/pom.xml @@ -19,67 +19,30 @@ 4.0.0 - org.mitre - openid-connect-parent + cz.muni.ics + perun-oidc-parent 2.0.0 ../pom.xml - openid-connect-server-webapp + perun-oidc-server-webapp war - OpenID Connect Server Webapp - - - - org.apache.maven.plugins - maven-compiler-plugin - - ${java-version} - ${java-version} - - - - org.apache.maven.plugins - maven-war-plugin - - openid-connect-server-webapp - - - src/main/webapp - true - - **/*.tag - **/*.jsp - - - - src/main/webapp - false - - **/*.tag - **/*.jsp - - - - less/** - - - - org.apache.maven.plugins - maven-dependency-plugin - - - install - install - - sources - - - - - - + + /etc/perun + FILE + oidc + LOCAL7 + info + + ${catalina.base}/logs/${CONTEXT_NAME} + + ${catalina.base}/logs/${CONTEXT_NAME} + trace + log + times + oidc + @@ -112,7 +75,78 @@ com.zaxxer HikariCP + + cz.muni.ics + perun-oidc-server + + + org.springframework.security.extensions + spring-security-saml2-core + - Deployable package of the OpenID Connect server + + ${final.name} + + + src/main/resources + true + + logback.xml + **/* + + + + + + org.apache.maven.plugins + maven-compiler-plugin + + ${java-version} + ${java-version} + + + + org.apache.maven.plugins + maven-war-plugin + + openid-connect-server-webapp + + + src/main/webapp + true + + **/*.tag + **/*.jsp + WEB-INF/user-context.xml + + + + src/main/webapp + false + + **/*.tag + **/*.jsp + + + + less/** + + + + org.apache.maven.plugins + maven-dependency-plugin + + + install + install + + sources + + + + + + + diff --git a/openid-connect-server-webapp/src/main/resources/db/hsql/clients.sql b/perun-oidc-server-webapp/src/main/resources/db/hsql/clients.sql similarity index 100% rename from openid-connect-server-webapp/src/main/resources/db/hsql/clients.sql rename to perun-oidc-server-webapp/src/main/resources/db/hsql/clients.sql diff --git a/openid-connect-server-webapp/src/main/resources/db/hsql/hsql_database_index.sql b/perun-oidc-server-webapp/src/main/resources/db/hsql/hsql_database_index.sql similarity index 100% rename from openid-connect-server-webapp/src/main/resources/db/hsql/hsql_database_index.sql rename to perun-oidc-server-webapp/src/main/resources/db/hsql/hsql_database_index.sql diff --git a/openid-connect-server-webapp/src/main/resources/db/hsql/hsql_database_tables.sql b/perun-oidc-server-webapp/src/main/resources/db/hsql/hsql_database_tables.sql similarity index 100% rename from openid-connect-server-webapp/src/main/resources/db/hsql/hsql_database_tables.sql rename to perun-oidc-server-webapp/src/main/resources/db/hsql/hsql_database_tables.sql diff --git a/openid-connect-server-webapp/src/main/resources/db/hsql/loading_temp_tables.sql b/perun-oidc-server-webapp/src/main/resources/db/hsql/loading_temp_tables.sql similarity index 100% rename from openid-connect-server-webapp/src/main/resources/db/hsql/loading_temp_tables.sql rename to perun-oidc-server-webapp/src/main/resources/db/hsql/loading_temp_tables.sql diff --git a/openid-connect-server-webapp/src/main/resources/db/hsql/scopes.sql b/perun-oidc-server-webapp/src/main/resources/db/hsql/scopes.sql similarity index 100% rename from openid-connect-server-webapp/src/main/resources/db/hsql/scopes.sql rename to perun-oidc-server-webapp/src/main/resources/db/hsql/scopes.sql diff --git a/openid-connect-server-webapp/src/main/resources/db/hsql/security-schema.sql b/perun-oidc-server-webapp/src/main/resources/db/hsql/security-schema.sql similarity index 100% rename from openid-connect-server-webapp/src/main/resources/db/hsql/security-schema.sql rename to perun-oidc-server-webapp/src/main/resources/db/hsql/security-schema.sql diff --git a/openid-connect-server-webapp/src/main/resources/db/hsql/users.sql b/perun-oidc-server-webapp/src/main/resources/db/hsql/users.sql similarity index 100% rename from openid-connect-server-webapp/src/main/resources/db/hsql/users.sql rename to perun-oidc-server-webapp/src/main/resources/db/hsql/users.sql diff --git a/openid-connect-server-webapp/src/main/resources/db/mysql/clients.sql b/perun-oidc-server-webapp/src/main/resources/db/mysql/clients.sql similarity index 100% rename from openid-connect-server-webapp/src/main/resources/db/mysql/clients.sql rename to perun-oidc-server-webapp/src/main/resources/db/mysql/clients.sql diff --git a/openid-connect-server-webapp/src/main/resources/db/mysql/mysql_database_index.sql b/perun-oidc-server-webapp/src/main/resources/db/mysql/mysql_database_index.sql similarity index 100% rename from openid-connect-server-webapp/src/main/resources/db/mysql/mysql_database_index.sql rename to perun-oidc-server-webapp/src/main/resources/db/mysql/mysql_database_index.sql diff --git a/openid-connect-server-webapp/src/main/resources/db/mysql/mysql_database_tables.sql b/perun-oidc-server-webapp/src/main/resources/db/mysql/mysql_database_tables.sql similarity index 100% rename from openid-connect-server-webapp/src/main/resources/db/mysql/mysql_database_tables.sql rename to perun-oidc-server-webapp/src/main/resources/db/mysql/mysql_database_tables.sql diff --git a/openid-connect-server-webapp/src/main/resources/db/mysql/scopes.sql b/perun-oidc-server-webapp/src/main/resources/db/mysql/scopes.sql similarity index 100% rename from openid-connect-server-webapp/src/main/resources/db/mysql/scopes.sql rename to perun-oidc-server-webapp/src/main/resources/db/mysql/scopes.sql diff --git a/openid-connect-server-webapp/src/main/resources/db/mysql/security-schema.sql b/perun-oidc-server-webapp/src/main/resources/db/mysql/security-schema.sql similarity index 100% rename from openid-connect-server-webapp/src/main/resources/db/mysql/security-schema.sql rename to perun-oidc-server-webapp/src/main/resources/db/mysql/security-schema.sql diff --git a/openid-connect-server-webapp/src/main/resources/db/mysql/users.sql b/perun-oidc-server-webapp/src/main/resources/db/mysql/users.sql similarity index 100% rename from openid-connect-server-webapp/src/main/resources/db/mysql/users.sql rename to perun-oidc-server-webapp/src/main/resources/db/mysql/users.sql diff --git a/openid-connect-server-webapp/src/main/resources/db/oracle/clients_oracle.sql b/perun-oidc-server-webapp/src/main/resources/db/oracle/clients_oracle.sql similarity index 100% rename from openid-connect-server-webapp/src/main/resources/db/oracle/clients_oracle.sql rename to perun-oidc-server-webapp/src/main/resources/db/oracle/clients_oracle.sql diff --git a/openid-connect-server-webapp/src/main/resources/db/oracle/create_db-user b/perun-oidc-server-webapp/src/main/resources/db/oracle/create_db-user similarity index 100% rename from openid-connect-server-webapp/src/main/resources/db/oracle/create_db-user rename to perun-oidc-server-webapp/src/main/resources/db/oracle/create_db-user diff --git a/openid-connect-server-webapp/src/main/resources/db/oracle/entity-mappings_oracle.xml b/perun-oidc-server-webapp/src/main/resources/db/oracle/entity-mappings_oracle.xml similarity index 84% rename from openid-connect-server-webapp/src/main/resources/db/oracle/entity-mappings_oracle.xml rename to perun-oidc-server-webapp/src/main/resources/db/oracle/entity-mappings_oracle.xml index 2aba62824..1578a9de6 100644 --- a/openid-connect-server-webapp/src/main/resources/db/oracle/entity-mappings_oracle.xml +++ b/perun-oidc-server-webapp/src/main/resources/db/oracle/entity-mappings_oracle.xml @@ -20,7 +20,7 @@ OpenID Connect Server entities - + @@ -33,7 +33,7 @@ - + @@ -57,7 +57,7 @@ - + @@ -70,7 +70,7 @@ - + @@ -81,7 +81,7 @@ - + @@ -92,27 +92,27 @@ - + - + - + - + - + @@ -124,7 +124,7 @@ - + @@ -135,7 +135,7 @@ - + @@ -146,7 +146,7 @@ - + @@ -157,7 +157,7 @@ - + @@ -168,7 +168,7 @@ - + @@ -179,7 +179,7 @@ - + @@ -190,7 +190,7 @@ - + @@ -201,7 +201,7 @@ - + @@ -212,7 +212,7 @@ - + @@ -223,7 +223,7 @@ - + @@ -234,7 +234,7 @@ - + @@ -245,7 +245,7 @@ - + @@ -256,7 +256,7 @@ - + @@ -267,7 +267,7 @@ - + @@ -278,4 +278,4 @@ - \ No newline at end of file + diff --git a/openid-connect-server-webapp/src/main/resources/db/oracle/loading_temp_tables_oracle.sql b/perun-oidc-server-webapp/src/main/resources/db/oracle/loading_temp_tables_oracle.sql similarity index 100% rename from openid-connect-server-webapp/src/main/resources/db/oracle/loading_temp_tables_oracle.sql rename to perun-oidc-server-webapp/src/main/resources/db/oracle/loading_temp_tables_oracle.sql diff --git a/openid-connect-server-webapp/src/main/resources/db/oracle/oracle_database_index.sql b/perun-oidc-server-webapp/src/main/resources/db/oracle/oracle_database_index.sql similarity index 100% rename from openid-connect-server-webapp/src/main/resources/db/oracle/oracle_database_index.sql rename to perun-oidc-server-webapp/src/main/resources/db/oracle/oracle_database_index.sql diff --git a/openid-connect-server-webapp/src/main/resources/db/oracle/oracle_database_tables.sql b/perun-oidc-server-webapp/src/main/resources/db/oracle/oracle_database_tables.sql similarity index 100% rename from openid-connect-server-webapp/src/main/resources/db/oracle/oracle_database_tables.sql rename to perun-oidc-server-webapp/src/main/resources/db/oracle/oracle_database_tables.sql diff --git a/openid-connect-server-webapp/src/main/resources/db/oracle/scopes_oracle.sql b/perun-oidc-server-webapp/src/main/resources/db/oracle/scopes_oracle.sql similarity index 100% rename from openid-connect-server-webapp/src/main/resources/db/oracle/scopes_oracle.sql rename to perun-oidc-server-webapp/src/main/resources/db/oracle/scopes_oracle.sql diff --git a/openid-connect-server-webapp/src/main/resources/db/oracle/security-schema_oracle.sql b/perun-oidc-server-webapp/src/main/resources/db/oracle/security-schema_oracle.sql similarity index 100% rename from openid-connect-server-webapp/src/main/resources/db/oracle/security-schema_oracle.sql rename to perun-oidc-server-webapp/src/main/resources/db/oracle/security-schema_oracle.sql diff --git a/openid-connect-server-webapp/src/main/resources/db/oracle/users_oracle.sql b/perun-oidc-server-webapp/src/main/resources/db/oracle/users_oracle.sql similarity index 100% rename from openid-connect-server-webapp/src/main/resources/db/oracle/users_oracle.sql rename to perun-oidc-server-webapp/src/main/resources/db/oracle/users_oracle.sql diff --git a/openid-connect-server-webapp/src/main/resources/db/psql/clients.sql b/perun-oidc-server-webapp/src/main/resources/db/psql/clients.sql similarity index 100% rename from openid-connect-server-webapp/src/main/resources/db/psql/clients.sql rename to perun-oidc-server-webapp/src/main/resources/db/psql/clients.sql diff --git a/openid-connect-server-webapp/src/main/resources/db/psql/psql_database_index.sql b/perun-oidc-server-webapp/src/main/resources/db/psql/psql_database_index.sql similarity index 100% rename from openid-connect-server-webapp/src/main/resources/db/psql/psql_database_index.sql rename to perun-oidc-server-webapp/src/main/resources/db/psql/psql_database_index.sql diff --git a/openid-connect-server-webapp/src/main/resources/db/psql/psql_database_tables.sql b/perun-oidc-server-webapp/src/main/resources/db/psql/psql_database_tables.sql similarity index 100% rename from openid-connect-server-webapp/src/main/resources/db/psql/psql_database_tables.sql rename to perun-oidc-server-webapp/src/main/resources/db/psql/psql_database_tables.sql diff --git a/openid-connect-server-webapp/src/main/resources/db/psql/scopes.sql b/perun-oidc-server-webapp/src/main/resources/db/psql/scopes.sql similarity index 100% rename from openid-connect-server-webapp/src/main/resources/db/psql/scopes.sql rename to perun-oidc-server-webapp/src/main/resources/db/psql/scopes.sql diff --git a/openid-connect-server-webapp/src/main/resources/db/psql/security-schema.sql b/perun-oidc-server-webapp/src/main/resources/db/psql/security-schema.sql similarity index 100% rename from openid-connect-server-webapp/src/main/resources/db/psql/security-schema.sql rename to perun-oidc-server-webapp/src/main/resources/db/psql/security-schema.sql diff --git a/openid-connect-server-webapp/src/main/resources/db/psql/users.sql b/perun-oidc-server-webapp/src/main/resources/db/psql/users.sql similarity index 100% rename from openid-connect-server-webapp/src/main/resources/db/psql/users.sql rename to perun-oidc-server-webapp/src/main/resources/db/psql/users.sql diff --git a/openid-connect-server-webapp/src/main/resources/keystore.jwks b/perun-oidc-server-webapp/src/main/resources/keystore.jwks similarity index 100% rename from openid-connect-server-webapp/src/main/resources/keystore.jwks rename to perun-oidc-server-webapp/src/main/resources/keystore.jwks diff --git a/perun-oidc-server-webapp/src/main/resources/localization/cs.properties b/perun-oidc-server-webapp/src/main/resources/localization/cs.properties new file mode 100644 index 000000000..bdd8ac27e --- /dev/null +++ b/perun-oidc-server-webapp/src/main/resources/localization/cs.properties @@ -0,0 +1,173 @@ +#CONSENT +yes=Ano, akceptuji +no=Ne, neakceptuji +login=Login +consent_privacy_policy=Zásady zpracování osobních údajů pro službu +consent_header=Obsah odesílaných osobních informací službě +consent_title=Obsah odesílaných osobních informací službě +remember=Příště se již neptat + +#APPROVE_DEVICE +device_approve_privacy=Bezpečnostní politika služby +device_approve_header=Schválení přístupu k Vašim datům +device_approve_title=Schválení přístupu k Vašim datům + +#DEVICE_APPROVED +device_approved_approved=Zařížení bylo autorizováno +device_approved_rejected=Zařízení byl odmítnut přístup +device_approved_title=Autorizace zařízení dokončena +device_approved_text_approved_start=Zařízení bylo úspěšně autorizováno. Nyní můžete pokračovat ke službě +device_approved_text_approved_end=na Vašem zařízení. Tahle stránka může být zavřena. +device_approved_text_rejected_start=Zařízení byl odmítnut přístup ke službě +device_approved_text_rejected_end=Jestli jste tak nechtěli učinit, zahajte proces autorizace od začátku. Tahle stránka může být zavřena. + + +#REQUEST USER CODE +request_code_title=Zadejte autorizační kód zařízení +request_code_header=Zadejte autorizační kód zařízení +user_code_empty_or_not_found=Nebyl zadán žádný kód anebo zadanej kód je nesprávný. +user_code_expired=Platnost použitého kódu vypršela. Prosíme, vyžádejte si nový a opakujte proces. +user_code_already_approved=Zadaný kód už byl použit. Prosíme, vyžádejte si nový a opakujte proces. +user_code_mismatch=Zadaný kód nebyl rozpoznán. Prosíme, ověřte že jste zadali správný kód. +user_code_error=Vyskytla se chyba pri zpracování Vašeho požadavku. Zkuste jej zopakovat. +user_code_submit=Pokračovat +user_code_info=Zadejte autorizační kód zobrazen na zařízení z kterého se snažíte přihlásit. +code=Kód + +#IsTestSpWarning +is_test_sp_warning_title=Varování - služba je testovací +is_test_sp_warning_header=Varování +is_test_sp_warning_text=Přistupujete ke službě, která je v testovacím režimu. +is_test_sp_warning_continue=Pokračovat + +#CLAIMS AND SCOPES +no_scopes=Žádné data nebudou odeslány +openid=Identifikátor uživatele na službě +sub=Identifikátor uživatele +profile=Profil uživatele +email=Email +address=Adresa +phone=Telefonní číslo +offline_access=Offline přístup +perun_api=Volání Perun API ve jménu uživatele +groupNames=Jména skupin ve kterých je uživatel členem +eduPersonEntitlement=Oprávnění +permissions_ega=Povolení pro EGA datasety +permissions_rems=Povolení pro REMS datasety +forwardedScopedAffiliations=Vztah k domovské(ým) organizaci(cím) +bona_fide_status=Bona fide status +country=Krajina +ga4gh=Global Alliance For Genomics and Health +eppns=Identifikátory osoby v organizaci +name=Jméno uživatele +preferred_username=Uživatelské jméno +given_name=Křestní jméno +middle_name=Střední jméno +family_name=Příjmení +locale=Jazyk +zoneinfo=Zóna +phone_number=Telefon + +#UNAPPROVED +contact_p=V případě nejasností nás kontaktujte na +403_header=Přístup odmítnut +403_text=Nemáte dostatečná práva pro přístup ke službě: +403_informationPage=Pro více informací o službě navštivte +403_contactSupport=Pokud si myslíte že máte mít přístup, kontaktujte administrátora: +403_subject=Problém s přihlášením do služby +403_isCesnetEligible_notSet_hdr=Přístup zamítnut +403_isCesnetEligible_notSet_msg=Přístup ke službě zamítnut, protože Váš účet není z české akademické instituce. Přihlaste se, prosím, pomocí svého účtu u akademické instituce.Znovu přihlásit +403_isCesnetEligible_expired_hdr=Přístup zamítnut +403_isCesnetEligible_expired_msg=Přístup ke službě zamítnut, protože plynula doba 12 měsíců od Vašeho posledního přihlášení účtem z české akademické instituce. Přihlaste se, prosím, pomocí svého účtu u akademické instituce.Znovu přihlásit +403_ensure_vo_hdr=Přístup zamítnut +403_ensure_vo_msg=Nemáte dostatečná práva pro přístup ke službě +403_authorization_hdr=Přístup zamítnut +403_authorization_msg=Tato stránka se Vám zobrazuje, protože nemáte přístup ke službě. To může být důsledkem přístupových omezení nastavených administrátorem. +403_not_in_test_vos_groups_hdr=Přístup zamítnut +403_not_in_test_vos_groups_msg=Tato stránka se Vám zobrazuje, protože nemáte přístup k testovacím službám AAI. +403_not_in_prod_vos_groups_hdr=Přístup zamítnut +403_not_in_prod_vos_groups_msg=Tato stránka se Vám zobrazuje, protože nemáte přístup ke službám AAI. +403_not_in_mandatory_vos_groups_hdr=Přístup zamítnut +403_not_in_mandatory_vos_groups_msg=Tato stránka se Vám zobrazuje, protože Vaše požadované členství v organizaci je nevalidní. +403_not_logged_in_hdr=Přístup zamítnut +403_not_logged_in_msg=Zdá se, že přihlášení selhalo. Zkuste, prosím, zavřít Váš prohlížeč a přihlásit se znovu. + +#GO TO REGISTRATION +go_to_registration_title=Je vyžadována Vaše aktivita +go_to_registration_header1=Pro přístup ke službě +go_to_registration_header2=je vyžadována Vaše aktivita +go_to_registration_continue=Pokračovat na stránku s doplňujícími informacemi + +#REGISTRATION +registration_title=Registrace pro přístup ke službě +registration_header1=Přístup ke službě +registration_header2=byl zamítnut +registration_message=Pro získání přístupu k dané službě je nutné být členem jedné z následujících skupin. Pokračujte výběrem příslušné organizace a skupiny. +registration_select_vo=Vyberte virtuální organizaci: +registration_select_group=Vyberte skupinu pro registraci: +registration_continue=Pokračovat na registrační stránku do vybrané skupiny + +#CESNET footer specific +footer_other_projects=OSTATNÍ PROJEKTY +footer_helpdesk=HELPDESK + +#AUP +aup_header=Formulář s podmínkami užití +must_agree_aup=Pro pokračování musíte souhlasit s následujícími podmínkami užití: +org_vo=Organizace / Virtuální Organizace +see_aup=Prohlédněte si podmínky užití ve verzi +here=zde. +agree_aup=Souhlasím s podmínkami užití + +#MUNI header specific +unif_login="Přihlášení na MU" +go_to_login_title=Přejít k přihlášení (Klávesová zkratka: Alt + 2) +go_to_login_text=Přejít k přihlášení +language=Česky +img_name=sso +img_width=180 +img_height=34 +other_lang=en +other_language=English +muni_logo=MUNI Jednotné přihlášení + +#MUNI footer specific +masaryk_university=© Masarykova univerzita +service=Službu +unified_login=Jednotné přihlášení na MU +provided=zajišťuje +ics=Ústav výpočetní techniky MU + +#Logout +logout.confirmation.submit=Odhlásit +logout.confirmation.deny=Zůstat přihlášen(a) +logout.confirmation.header=Potvrzení odhlášení +logout.confirmation.explanation=Skutečně se chcete odhlásit od poskytovatele identity? + +#Continue in ensure_vo +continue_direct_title=Přesměrování na registraci +continue_direct_header=Budete přesměrován(a) +continue_direct_heading=Zaregistrujte se pro získaní přístupu +continue_direct_text=Nemáte dostatečná oprávnení po přístup ke službě. Kliknutím na tlačítko níže, budete přesměrován(a) na registraci pro získání přístupu. +continue_direct_btn=Pokračovat + +# SAML Logout Success (/logout_success) +logout_success_title=Odhlášení proběhlo úspěšně +logout_success_header=Odhlášení proběhlo úspěšně +logout_success_msg=Byl(a) jste úspěšně odhlášen(a). + +# SAML Login Failure (/login_failure) +login_failure_title=Problém s přihlášením +login_failure_header=Problém s přihlášením +login_failure_msg=Ups! Zdá se, že jsme Vás nemohli přihlásit. Zkuste to znovu. +login_failure_contact_us=Pokud problém přetrvává, kontaktuje nás na + +# SAML Login Success (/login_success) +login_success_title=Přihlášení proběhlo úspěšně +login_success_header=Přihlášení proběhlo úspěšně +login_success_msg=Byl(a) jste úspěšně přihlášen(a), avšak neregistrujeme žádnou službu, na kterou jste se pokoušel(a) přistoupit. + +# Logout denied (endsession endpoint with clicking NO) +logout_denied_title=Odhlášení zrušeno +logout_denied_header=Odhlášení zrušeno +logout_denied_msg=Proces odhlášení byl zastaven. diff --git a/perun-oidc-server-webapp/src/main/resources/localization/en.properties b/perun-oidc-server-webapp/src/main/resources/localization/en.properties new file mode 100644 index 000000000..be19a55ef --- /dev/null +++ b/perun-oidc-server-webapp/src/main/resources/localization/en.properties @@ -0,0 +1,172 @@ +#CONSENT +yes=Yes, continue +no=No, cancel +login=login +consent_privacy_policy=Privacy policy for the service +consent_header=Consent about releasing personal information to service +consent_title=Consent about releasing personal information to service +remember=Do not ask again + +#APPROVE_DEVICE +device_approve_privacy=Privacy policy for the service +device_approve_header=Approve device to access your data +device_approve_title=Approve device to access your data + +#DEVICE_APPROVED +device_approved_approved=The device has been authorized. +device_approved_rejected=The device has been rejected authorization. +device_approved_title=Device approval result +device_approved_text_approved_start=The device has been successfully authorized. You can now access the service +device_approved_text_approved_end=on your device. You may now close this page. +device_approved_text_rejected_start=The device has been denied access to the service +device_approved_text_rejected_end=If you did not intend to do this, start the authorization process again. You may now close this page. + +#REQUEST USER CODE +request_code_title=Enter the device authorization code +request_code_header=Enter the device authorization code +user_code_empty_or_not_found=No authorization code has been provided or it has not been recognized. +user_code_expired=The authorization code you have used has expired. Please request a new one and restart the process. +user_code_already_approved=The authorization code you have used has been already used. Please request a new one and restart the process. +user_code_mismatch=The code you have used has not been recognized. Please verify your input. +user_code_error=An error has occurred while processing your request. Please try it again. +user_code_submit=Submit +user_code_info=Enter the code displayed on the device you are trying to authenticate on. +code=Code + +#IsTestSpWarning +is_test_sp_warning_title=Warning - test service +is_test_sp_warning_header=Warning +is_test_sp_warning_text=You are about to access service, which is in testing environment. +is_test_sp_warning_continue=Continue + + +#CLAIMS AND SCOPES +no_scopes=No data will be released +sub=Identifier of user +openid=Identifier of user on a service +profile=Profile +email=Email +address=Adress +phone=Phone number +offline_access=Offline access +perun_api=Calls to Perun API in the name of user +groupNames=Names of groups that user is member of +eduPersonEntitlement=Entitlement +permissions_ega=Permissions for EGA datasets +permissions_rems=Permissions for REMS datasets +forwardedScopedAffiliations=Home organization affiliation +bona_fide_status=Bona fide status +country=Country +eppns=Person principal names +name=Name of user +preferred_username=Username +given_name=Given name +middle_name=Middle name +family_name=Family name +locale=Language +zoneinfo=Zone +phone_number=Phone + +#UNAPPROVED +contact_p=In case of any questions, do not hesitate to contact us at +403_header=Access forbidden +403_text=You don't meet the prerequisites for accessing the service: +403_informationPage=For more information about this service please visit this +403_contactSupport=If you think you should have an access contact service operator at +403_subject=Problem with login to service: +403_isCesnetEligible_notSet_hdr=Access denied +403_isCesnetEligible_notSet_msg=Your account is not from Czech academic institution. Please log in with your account from academic institution.Log in again +403_isCesnetEligible_expired_hdr=Access denied +403_isCesnetEligible_expired_msg=Your last login, from Czech academic institution, has been registered 12 months ago. Please sign in with your account from academic institution.Log in again +403_ensure_vo_hdr=Access denied +403_ensure_vo_msg=You don't meet the prerequisites to access the service. +403_authorization_hdr=Access denied +403_authorization_msg=You see this page because you are not allowed to access the service. This situation can be a result of the access restrictions that the service administrator has set up. +403_not_in_test_vos_groups_hdr=Access denied +403_not_in_test_vos_groups_msg=You see this page because you are not allowed to access AAI's testing services. +403_not_in_prod_vos_groups_hdr=Access denied +403_not_in_prod_vos_groups_msg=You see this page because you are not allowed to access AAI's services. +403_not_in_mandatory_vos_groups_hdr=Access denied +403_not_in_mandatory_vos_groups_msg=You are seeing this page because your membership in the required organizational units is invalid. +403_not_logged_in_hdr=Access denied +403_not_logged_in_msg=It appears the login process has failed. Please close your browser and try to log in again. + +#GO TO REGISTRATION +go_to_registration_title=Your activity is necessary +go_to_registration_header1=Your activity is necessary to access the +go_to_registration_header2=service +go_to_registration_continue=Continue to a page with additional information + +#REGISTRATION +registration_title=Registration for access to the service +registration_header1=Access to the service +registration_header2=has been forbidden +registration_message=To access the service it is necessary to have a valid membership in one of the following groups. Please proceed with selection of organization and group for registration. +registration_select_vo=Select virtual organization for registration: +registration_select_group=Select group for registration: +registration_continue=Continue to the registration page for selected group + +#CESNET footer specific +footer_other_projects=OTHER CESNET PROJECTS +footer_helpdesk=HELPDESK + +#AUP +aup_header=Acceptable Usage Policy form +must_agree_aup=You must agree to the following acceptable usage policies: +org_vo=Organization / Virtual Organization +see_aup=See the acceptable usage policy in version +here=here. +agree_aup=I agree with the acceptable usage policy + +#MUNI header specific +unif_login=Unified MU login +go_to_login_title=Go to login (Shortcut: Alt + 2) +go_to_login_text=Go to login +language=English +img_name=sso-en +img_width=160 +img_height=35 +other_lang=cs +other_language=Česky +muni_logo=MUNI Unified login + +#MUNI footer specific +masaryk_university=© Masaryk University +service=The service +unified_login=Unified MU login +provided=is provided by +ics=Institute of Computer Science + +#Logout +logout.confirmation.submit=Log Out +logout.confirmation.deny=Stay Logged In +logout.confirmation.header=Confirm logout +logout.confirmation.explanation=Do you want to log out of the identity provider? + +#Continue in ensure_vo +continue_direct_title=Redirect to registration +continue_direct_header=You will be redirected +continue_direct_heading=Register to get access +continue_direct_text=You don't meet the prerequisites to access the service. By clicking the button below, you will be redirected to a registration page, where you can apply for access. +continue_direct_btn=Continue + +# SAML Logout Success (/logout_success) +logout_success_title=Logout success +logout_success_header=Logout success +logout_success_msg=You have been successfully logged out. + +# SAML Login Failure (/login_failure) +login_failure_title=Login failure +login_failure_header=Login error +login_failure_msg=Ooops! It seems like an error during the login. Please try to log in again. +login_failure_contact_us=If the problem persists, contact us at + +# SAML Login Success (/login_success) +login_success_title=Login success +login_success_header=Login success +login_success_msg=You have successfully logged in. However, it seems we have no service to forward you to. + +# Logout denied (endsession endpoint with clicking NO) +logout_denied_title=Logout denied +logout_denied_header=Logout canceled +logout_denied_msg=You have canceled the logout process. diff --git a/openid-connect-server-webapp/src/main/resources/log4j.xml b/perun-oidc-server-webapp/src/main/resources/log4j.xml similarity index 88% rename from openid-connect-server-webapp/src/main/resources/log4j.xml rename to perun-oidc-server-webapp/src/main/resources/log4j.xml index efb4074fe..3293dcfd4 100644 --- a/openid-connect-server-webapp/src/main/resources/log4j.xml +++ b/perun-oidc-server-webapp/src/main/resources/log4j.xml @@ -32,28 +32,28 @@ - + - + - + - + - + - + - + - + diff --git a/perun-oidc-server-webapp/src/main/resources/logback.xml b/perun-oidc-server-webapp/src/main/resources/logback.xml new file mode 100644 index 000000000..30fe672a2 --- /dev/null +++ b/perun-oidc-server-webapp/src/main/resources/logback.xml @@ -0,0 +1,58 @@ + + ${log.contextName} + + + + + + ${log.rolling-file}.${log.file-extension} + + ${log.rolling-file}.${log.file-extension}.%d{yyyy-MM-dd} + + + ${PATTERN} + + + + + + ${log.file}.${log.file-extension} + + ${PATTERN} + + + + + + + ${log.facility} + true + ${PATTERN_SYSLOG} + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/perun-oidc-server-webapp/src/main/resources/web_classes/web_html_classes.properties b/perun-oidc-server-webapp/src/main/resources/web_classes/web_html_classes.properties new file mode 100644 index 000000000..d5fa0d22d --- /dev/null +++ b/perun-oidc-server-webapp/src/main/resources/web_classes/web_html_classes.properties @@ -0,0 +1,4 @@ +perun-attrname.h2.class=h4 oh mb-0 mt-0 +perun-attrname.label.class=h4 mb-0 mt-0 +perun-attrcontainer.ul.class= +perun-attrlist.h3.class=h5 mb-0 mt-0 \ No newline at end of file diff --git a/openid-connect-server-webapp/src/main/webapp/META-INF/MANIFEST.MF b/perun-oidc-server-webapp/src/main/webapp/META-INF/MANIFEST.MF similarity index 100% rename from openid-connect-server-webapp/src/main/webapp/META-INF/MANIFEST.MF rename to perun-oidc-server-webapp/src/main/webapp/META-INF/MANIFEST.MF diff --git a/openid-connect-server-webapp/src/main/webapp/WEB-INF/application-context.xml b/perun-oidc-server-webapp/src/main/webapp/WEB-INF/application-context.xml similarity index 76% rename from openid-connect-server-webapp/src/main/webapp/WEB-INF/application-context.xml rename to perun-oidc-server-webapp/src/main/webapp/WEB-INF/application-context.xml index ed566e002..dae4f464f 100644 --- a/openid-connect-server-webapp/src/main/webapp/WEB-INF/application-context.xml +++ b/perun-oidc-server-webapp/src/main/webapp/WEB-INF/application-context.xml @@ -33,7 +33,7 @@ http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.3.xsd"> - + @@ -44,23 +44,23 @@ - - + + - - + + - - - - - - - + + + + + + + @@ -68,17 +68,17 @@ - - + + - - - - - - - + + + + + + + @@ -102,7 +102,7 @@ - + @@ -127,14 +127,14 @@ - - + + - - + + @@ -149,7 +149,7 @@ - + @@ -158,7 +158,7 @@ - + @@ -167,7 +167,7 @@ - + @@ -175,14 +175,14 @@ - + - - - - + /introspect @@ -256,7 +256,7 @@ - + @@ -270,7 +270,7 @@ - + diff --git a/openid-connect-server-webapp/src/main/webapp/WEB-INF/assertion-config.xml b/perun-oidc-server-webapp/src/main/webapp/WEB-INF/assertion-config.xml similarity index 83% rename from openid-connect-server-webapp/src/main/webapp/WEB-INF/assertion-config.xml rename to perun-oidc-server-webapp/src/main/webapp/WEB-INF/assertion-config.xml index 0ec4ce7f6..4836d3614 100644 --- a/openid-connect-server-webapp/src/main/webapp/WEB-INF/assertion-config.xml +++ b/perun-oidc-server-webapp/src/main/webapp/WEB-INF/assertion-config.xml @@ -29,16 +29,16 @@ http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.3.xsd"> - + - + - + - + @@ -47,4 +47,4 @@ - \ No newline at end of file + diff --git a/openid-connect-server-webapp/src/main/webapp/WEB-INF/authz-config.xml b/perun-oidc-server-webapp/src/main/webapp/WEB-INF/authz-config.xml similarity index 96% rename from openid-connect-server-webapp/src/main/webapp/WEB-INF/authz-config.xml rename to perun-oidc-server-webapp/src/main/webapp/WEB-INF/authz-config.xml index 4d5242ae1..4ca0109b9 100644 --- a/openid-connect-server-webapp/src/main/webapp/WEB-INF/authz-config.xml +++ b/perun-oidc-server-webapp/src/main/webapp/WEB-INF/authz-config.xml @@ -52,7 +52,7 @@ - + diff --git a/perun-oidc-server-webapp/src/main/webapp/WEB-INF/classes/db/mysql/acrs.sql b/perun-oidc-server-webapp/src/main/webapp/WEB-INF/classes/db/mysql/acrs.sql new file mode 100644 index 000000000..0013f501a --- /dev/null +++ b/perun-oidc-server-webapp/src/main/webapp/WEB-INF/classes/db/mysql/acrs.sql @@ -0,0 +1,22 @@ +CREATE TABLE IF NOT EXISTS acrs ( + id BIGINT AUTO_INCREMENT, + client_id VARCHAR(2048) NOT NULL, + sub VARCHAR(2048) NOT NULL, + state VARCHAR(2048) NOT NULL, + shib_authn_context_class VARCHAR(2048) NOT NULL, + expiration BIGINT NOT NULL, + PRIMARY KEY (id) +); + +ALTER TABLE acrs MODIFY COLUMN expiration BIGINT; + +CREATE TABLE IF NOT EXISTS device_code_acrs ( + id BIGINT AUTO_INCREMENT, + device_code VARCHAR(2048) NOT NULL, + user_code VARCHAR(2048) NOT NULL, + shib_authn_context_class VARCHAR(2048), + expiration BIGINT NOT NULL, + PRIMARY KEY (id) +); + +ALTER TABLE device_code_acrs MODIFY COLUMN expiration BIGINT; diff --git a/perun-oidc-server-webapp/src/main/webapp/WEB-INF/classes/db/mysql/db_update.sql b/perun-oidc-server-webapp/src/main/webapp/WEB-INF/classes/db/mysql/db_update.sql new file mode 100644 index 000000000..733cc6e7d --- /dev/null +++ b/perun-oidc-server-webapp/src/main/webapp/WEB-INF/classes/db/mysql/db_update.sql @@ -0,0 +1,10 @@ +ALTER TABLE authentication_holder_request_parameter +MODIFY COLUMN val TEXT; + +CREATE TABLE shedlock( + name VARCHAR(64), + lock_until TIMESTAMP(3) NULL, + locked_at TIMESTAMP(3) NULL, + locked_by VARCHAR(255), + PRIMARY KEY (name) +); diff --git a/perun-oidc-server-webapp/src/main/webapp/WEB-INF/classes/db/mysql/scopes.sql b/perun-oidc-server-webapp/src/main/webapp/WEB-INF/classes/db/mysql/scopes.sql new file mode 100644 index 000000000..15bb8f1ef --- /dev/null +++ b/perun-oidc-server-webapp/src/main/webapp/WEB-INF/classes/db/mysql/scopes.sql @@ -0,0 +1,39 @@ +-- +-- Turn off autocommit and start a transaction so that we can use the temp tables +-- + +SET AUTOCOMMIT = 0; + +START TRANSACTION; + +CREATE TEMPORARY TABLE IF NOT EXISTS system_scope_TEMP ( + scope VARCHAR(256), + description VARCHAR(4096), + icon VARCHAR(256), + restricted BOOLEAN, + default_scope BOOLEAN +); +-- +-- Insert scope information into the temporary tables. +-- + +INSERT INTO system_scope_TEMP (scope, description, icon, restricted, default_scope) VALUES + ('openid', 'log in using your identity', 'user', false, true), + ('profile', 'basic profile information', 'list-alt', false, true), + ('email', 'email address', 'envelope', false, true), + ('address', 'physical address', 'home', false, true), + ('phone', 'telephone number', 'bell', false, true), + ('offline_access', 'offline access', 'time', false, false), + ('perun_api', 'calls to Perun API in your roles', 'cog', true, false); + +-- +-- Merge the temporary scopes safely into the database. This is a two-step process to keep scopes from being created on every startup with a persistent store. +-- + +INSERT INTO system_scope (scope, description, icon, restricted, default_scope) + SELECT scope, description, icon, restricted, default_scope FROM system_scope_TEMP + ON DUPLICATE KEY UPDATE system_scope.scope = system_scope.scope; + +COMMIT; + +SET AUTOCOMMIT = 1; diff --git a/perun-oidc-server-webapp/src/main/webapp/WEB-INF/classes/db/psql/acrs.sql b/perun-oidc-server-webapp/src/main/webapp/WEB-INF/classes/db/psql/acrs.sql new file mode 100644 index 000000000..96f415140 --- /dev/null +++ b/perun-oidc-server-webapp/src/main/webapp/WEB-INF/classes/db/psql/acrs.sql @@ -0,0 +1,12 @@ +CREATE TABLE IF NOT EXISTS acrs ( + id BIGINT AUTO_INCREMENT, + client_id VARCHAR(2048) NOT NULL, + sub VARCHAR(2048) NOT NULL, + acr_values VARCHAR(2048) NOT NULL, + state VARCHAR(2048) NOT NULL, + shib_authn_context_class VARCHAR(2048) NOT NULL, + expiration BIGINT NOT NULL, + PRIMARY KEY (id) +); + +ALTER TABLE acrs MODIFY COLUMN expiration BIGINT; diff --git a/perun-oidc-server-webapp/src/main/webapp/WEB-INF/classes/db/psql/db_update.sql b/perun-oidc-server-webapp/src/main/webapp/WEB-INF/classes/db/psql/db_update.sql new file mode 100644 index 000000000..5eca832d6 --- /dev/null +++ b/perun-oidc-server-webapp/src/main/webapp/WEB-INF/classes/db/psql/db_update.sql @@ -0,0 +1,7 @@ +CREATE TABLE shedlock( + name VARCHAR(64), + lock_until TIMESTAMP(3) NULL, + locked_at TIMESTAMP(3) NULL, + locked_by VARCHAR(255), + PRIMARY KEY (name) +); diff --git a/perun-oidc-server-webapp/src/main/webapp/WEB-INF/classes/db/psql/loading_temp_tables.sql b/perun-oidc-server-webapp/src/main/webapp/WEB-INF/classes/db/psql/loading_temp_tables.sql new file mode 100644 index 000000000..37b0092e7 --- /dev/null +++ b/perun-oidc-server-webapp/src/main/webapp/WEB-INF/classes/db/psql/loading_temp_tables.sql @@ -0,0 +1,73 @@ +-- +-- Temporary tables used during the bootstrapping process to safely load users and clients. +-- These are not needed if you're not using the users.sql/clients.sql files to bootstrap the database. +-- + +CREATE TEMPORARY TABLE IF NOT EXISTS authorities_TEMP ( + username varchar(50) not null, + authority varchar(50) not null, + constraint ix_authority_TEMP unique (username,authority)); + +CREATE TEMPORARY TABLE IF NOT EXISTS users_TEMP ( + username varchar(50) not null primary key, + password varchar(50) not null, + enabled boolean not null); + +CREATE TEMPORARY TABLE IF NOT EXISTS user_info_TEMP ( + sub VARCHAR(256) not null primary key, + preferred_username VARCHAR(256), + name VARCHAR(256), + given_name VARCHAR(256), + family_name VARCHAR(256), + middle_name VARCHAR(256), + nickname VARCHAR(256), + profile VARCHAR(256), + picture VARCHAR(256), + website VARCHAR(256), + email VARCHAR(256), + email_verified BOOLEAN, + gender VARCHAR(256), + zone_info VARCHAR(256), + locale VARCHAR(256), + phone_number VARCHAR(256), + address_id VARCHAR(256), + updated_time VARCHAR(256), + birthdate VARCHAR(256) +); + +CREATE TEMPORARY TABLE IF NOT EXISTS client_details_TEMP ( + client_description VARCHAR(256), + dynamically_registered BOOLEAN, + id_token_validity_seconds BIGINT, + + client_id VARCHAR(256), + client_secret VARCHAR(2048), + access_token_validity_seconds BIGINT, + refresh_token_validity_seconds BIGINT, + allow_introspection BOOLEAN, + + client_name VARCHAR(256) +); + +CREATE TEMPORARY TABLE IF NOT EXISTS client_scope_TEMP ( + owner_id VARCHAR(256), + scope VARCHAR(2048) +); + +CREATE TEMPORARY TABLE IF NOT EXISTS client_redirect_uri_TEMP ( + owner_id VARCHAR(256), + redirect_uri VARCHAR(2048) +); + +CREATE TEMPORARY TABLE IF NOT EXISTS client_grant_type_TEMP ( + owner_id VARCHAR(256), + grant_type VARCHAR(2000) +); + +CREATE TEMPORARY TABLE IF NOT EXISTS system_scope_TEMP ( + scope VARCHAR(256), + description VARCHAR(4096), + icon VARCHAR(256), + restricted BOOLEAN, + default_scope BOOLEAN +); \ No newline at end of file diff --git a/perun-oidc-server-webapp/src/main/webapp/WEB-INF/classes/db/psql/psql_database_tables.sql b/perun-oidc-server-webapp/src/main/webapp/WEB-INF/classes/db/psql/psql_database_tables.sql new file mode 100644 index 000000000..9a5c867d5 --- /dev/null +++ b/perun-oidc-server-webapp/src/main/webapp/WEB-INF/classes/db/psql/psql_database_tables.sql @@ -0,0 +1,384 @@ +-- +-- Tables for OIDC Server functionality, PostgreSQL +-- + +CREATE TABLE IF NOT EXISTS access_token ( + id SERIAL PRIMARY KEY, + token_value VARCHAR(4096), + expiration TIMESTAMP, + token_type VARCHAR(256), + refresh_token_id BIGINT, + client_id BIGINT, + auth_holder_id BIGINT, + approved_site_id BIGINT, + UNIQUE(token_value) +); + +CREATE TABLE IF NOT EXISTS access_token_permissions ( + access_token_id BIGINT NOT NULL, + permission_id BIGINT NOT NULL +); + +CREATE TABLE IF NOT EXISTS address ( + id SERIAL PRIMARY KEY, + formatted VARCHAR(256), + street_address VARCHAR(256), + locality VARCHAR(256), + region VARCHAR(256), + postal_code VARCHAR(256), + country VARCHAR(256) +); + +CREATE TABLE IF NOT EXISTS approved_site ( + id SERIAL PRIMARY KEY, + user_id VARCHAR(256), + client_id VARCHAR(256), + creation_date TIMESTAMP, + access_date TIMESTAMP, + timeout_date TIMESTAMP, + whitelisted_site_id BIGINT +); + +CREATE TABLE IF NOT EXISTS approved_site_scope ( + owner_id BIGINT, + scope VARCHAR(256) +); + +CREATE TABLE IF NOT EXISTS authentication_holder ( + id SERIAL PRIMARY KEY, + user_auth_id BIGINT, + approved BOOLEAN, + redirect_uri VARCHAR(2048), + client_id VARCHAR(256) +); + +CREATE TABLE IF NOT EXISTS authentication_holder_authority ( + owner_id BIGINT, + authority VARCHAR(256) +); + +CREATE TABLE IF NOT EXISTS authentication_holder_resource_id ( + owner_id BIGINT, + resource_id VARCHAR(2048) +); + +CREATE TABLE IF NOT EXISTS authentication_holder_response_type ( + owner_id BIGINT, + response_type VARCHAR(2048) +); + +CREATE TABLE IF NOT EXISTS authentication_holder_extension ( + owner_id BIGINT, + extension VARCHAR(2048), + val VARCHAR(2048) +); + +CREATE TABLE IF NOT EXISTS authentication_holder_scope ( + owner_id BIGINT, + scope VARCHAR(2048) +); + +CREATE TABLE IF NOT EXISTS authentication_holder_request_parameter ( + owner_id BIGINT, + param VARCHAR(2048), + val TEXT +); + +CREATE TABLE IF NOT EXISTS saved_user_auth ( + id SERIAL PRIMARY KEY, + name VARCHAR(1024), + authenticated BOOLEAN, + source_class VARCHAR(2048) +); + +CREATE TABLE IF NOT EXISTS saved_user_auth_authority ( + owner_id BIGINT, + authority VARCHAR(256) +); + +CREATE TABLE IF NOT EXISTS client_authority ( + owner_id BIGINT, + authority VARCHAR(256) +); + +CREATE TABLE IF NOT EXISTS authorization_code ( + id SERIAL PRIMARY KEY, + code VARCHAR(256), + auth_holder_id BIGINT, + expiration TIMESTAMP +); + +CREATE TABLE IF NOT EXISTS client_grant_type ( + owner_id BIGINT, + grant_type VARCHAR(2000) +); + +CREATE TABLE IF NOT EXISTS client_response_type ( + owner_id BIGINT, + response_type VARCHAR(2000) +); + +CREATE TABLE IF NOT EXISTS blacklisted_site ( + id SERIAL PRIMARY KEY, + uri VARCHAR(2048) +); + +CREATE TABLE IF NOT EXISTS client_details ( + id SERIAL PRIMARY KEY, + + client_description VARCHAR(1024), + reuse_refresh_tokens BOOLEAN DEFAULT true NOT NULL, + dynamically_registered BOOLEAN DEFAULT false NOT NULL, + allow_introspection BOOLEAN DEFAULT false NOT NULL, + id_token_validity_seconds BIGINT DEFAULT 600 NOT NULL, + device_code_validity_seconds BIGINT, + + client_id VARCHAR(256), + client_secret VARCHAR(2048), + access_token_validity_seconds BIGINT, + refresh_token_validity_seconds BIGINT, + + application_type VARCHAR(256), + client_name VARCHAR(256), + token_endpoint_auth_method VARCHAR(256), + subject_type VARCHAR(256), + + logo_uri VARCHAR(2048), + policy_uri VARCHAR(2048), + client_uri VARCHAR(2048), + tos_uri VARCHAR(2048), + + jwks_uri VARCHAR(2048), + jwks VARCHAR(8192), + sector_identifier_uri VARCHAR(2048), + + request_object_signing_alg VARCHAR(256), + + user_info_signed_response_alg VARCHAR(256), + user_info_encrypted_response_alg VARCHAR(256), + user_info_encrypted_response_enc VARCHAR(256), + + id_token_signed_response_alg VARCHAR(256), + id_token_encrypted_response_alg VARCHAR(256), + id_token_encrypted_response_enc VARCHAR(256), + + token_endpoint_auth_signing_alg VARCHAR(256), + + default_max_age BIGINT, + require_auth_time BOOLEAN, + created_at TIMESTAMP, + initiate_login_uri VARCHAR(2048), + clear_access_tokens_on_refresh BOOLEAN DEFAULT true NOT NULL, + + software_statement VARCHAR(4096), + software_id VARCHAR(2048), + software_version VARCHAR(2048), + + code_challenge_method VARCHAR(256), + + UNIQUE (client_id) +); + +CREATE TABLE IF NOT EXISTS client_request_uri ( + owner_id BIGINT, + request_uri VARCHAR(2000) +); + +CREATE TABLE IF NOT EXISTS client_post_logout_redirect_uri ( + owner_id BIGINT, + post_logout_redirect_uri VARCHAR(2000) +); + +CREATE TABLE IF NOT EXISTS client_default_acr_value ( + owner_id BIGINT, + default_acr_value VARCHAR(2000) +); + +CREATE TABLE IF NOT EXISTS client_contact ( + owner_id BIGINT, + contact VARCHAR(256) +); + +CREATE TABLE IF NOT EXISTS client_redirect_uri ( + owner_id BIGINT, + redirect_uri VARCHAR(2048) +); + +CREATE TABLE IF NOT EXISTS client_claims_redirect_uri ( + owner_id BIGINT, + redirect_uri VARCHAR(2048) +); + +CREATE TABLE IF NOT EXISTS refresh_token ( + id SERIAL PRIMARY KEY, + token_value VARCHAR(4096), + expiration TIMESTAMP, + auth_holder_id BIGINT, + client_id BIGINT +); + +CREATE TABLE IF NOT EXISTS client_resource ( + owner_id BIGINT, + resource_id VARCHAR(256) +); + +CREATE TABLE IF NOT EXISTS client_scope ( + owner_id BIGINT, + scope VARCHAR(2048) +); + +CREATE TABLE IF NOT EXISTS token_scope ( + owner_id BIGINT, + scope VARCHAR(2048) +); + +CREATE TABLE IF NOT EXISTS system_scope ( + id SERIAL PRIMARY KEY, + scope VARCHAR(256) NOT NULL, + description VARCHAR(4096), + icon VARCHAR(256), + restricted BOOLEAN DEFAULT false NOT NULL, + default_scope BOOLEAN DEFAULT false NOT NULL, + UNIQUE (scope) +); + +CREATE TABLE IF NOT EXISTS user_info ( + id SERIAL PRIMARY KEY, + sub VARCHAR(256), + preferred_username VARCHAR(256), + name VARCHAR(256), + given_name VARCHAR(256), + family_name VARCHAR(256), + middle_name VARCHAR(256), + nickname VARCHAR(256), + profile VARCHAR(256), + picture VARCHAR(256), + website VARCHAR(256), + email VARCHAR(256), + email_verified BOOLEAN, + gender VARCHAR(256), + zone_info VARCHAR(256), + locale VARCHAR(256), + phone_number VARCHAR(256), + phone_number_verified BOOLEAN, + address_id VARCHAR(256), + updated_time VARCHAR(256), + birthdate VARCHAR(256), + src VARCHAR(4096) +); + +CREATE TABLE IF NOT EXISTS whitelisted_site ( + id SERIAL PRIMARY KEY, + creator_user_id VARCHAR(256), + client_id VARCHAR(256) +); + +CREATE TABLE IF NOT EXISTS whitelisted_site_scope ( + owner_id BIGINT, + scope VARCHAR(256) +); + +CREATE TABLE IF NOT EXISTS pairwise_identifier ( + id SERIAL PRIMARY KEY, + identifier VARCHAR(256), + sub VARCHAR(256), + sector_identifier VARCHAR(2048) +); + +CREATE TABLE IF NOT EXISTS resource_set ( + id SERIAL PRIMARY KEY, + name VARCHAR(1024) NOT NULL, + uri VARCHAR(1024), + icon_uri VARCHAR(1024), + rs_type VARCHAR(256), + owner VARCHAR(256) NOT NULL, + client_id VARCHAR(256) +); + +CREATE TABLE IF NOT EXISTS resource_set_scope ( + owner_id BIGINT NOT NULL, + scope VARCHAR(256) NOT NULL +); + +CREATE TABLE IF NOT EXISTS permission_ticket ( + id SERIAL PRIMARY KEY, + ticket VARCHAR(256) NOT NULL, + permission_id BIGINT NOT NULL, + expiration TIMESTAMP +); + +CREATE TABLE IF NOT EXISTS permission ( + id SERIAL PRIMARY KEY, + resource_set_id BIGINT +); + +CREATE TABLE IF NOT EXISTS permission_scope ( + owner_id BIGINT NOT NULL, + scope VARCHAR(256) NOT NULL +); + +CREATE TABLE IF NOT EXISTS claim ( + id SERIAL PRIMARY KEY, + name VARCHAR(256), + friendly_name VARCHAR(1024), + claim_type VARCHAR(1024), + claim_value VARCHAR(1024) +); + +CREATE TABLE IF NOT EXISTS claim_to_policy ( + policy_id BIGINT NOT NULL, + claim_id BIGINT NOT NULL +); + +CREATE TABLE IF NOT EXISTS claim_to_permission_ticket ( + permission_ticket_id BIGINT NOT NULL, + claim_id BIGINT NOT NULL +); + +CREATE TABLE IF NOT EXISTS policy ( + id SERIAL PRIMARY KEY, + name VARCHAR(1024), + resource_set_id BIGINT +); + +CREATE TABLE IF NOT EXISTS policy_scope ( + owner_id BIGINT NOT NULL, + scope VARCHAR(256) NOT NULL +); + +CREATE TABLE IF NOT EXISTS claim_token_format ( + owner_id BIGINT NOT NULL, + claim_token_format VARCHAR(1024) +); + +CREATE TABLE IF NOT EXISTS claim_issuer ( + owner_id BIGINT NOT NULL, + issuer VARCHAR(1024) +); + +CREATE TABLE IF NOT EXISTS saved_registered_client ( + id SERIAL PRIMARY KEY, + issuer VARCHAR(1024), + registered_client VARCHAR(8192) +); + +CREATE TABLE IF NOT EXISTS device_code ( + id BIGSERIAL PRIMARY KEY, + device_code VARCHAR(1024), + user_code VARCHAR(1024), + expiration TIMESTAMP NULL, + client_id VARCHAR(256), + approved BOOLEAN, + auth_holder_id BIGINT +); + +CREATE TABLE IF NOT EXISTS device_code_scope ( + owner_id BIGINT NOT NULL, + scope VARCHAR(256) NOT NULL +); + +CREATE TABLE IF NOT EXISTS device_code_request_parameter ( + owner_id BIGINT, + param VARCHAR(2048), + val VARCHAR(2048) +); diff --git a/perun-oidc-server-webapp/src/main/webapp/WEB-INF/classes/db/psql/scopes.sql b/perun-oidc-server-webapp/src/main/webapp/WEB-INF/classes/db/psql/scopes.sql new file mode 100644 index 000000000..e316b04db --- /dev/null +++ b/perun-oidc-server-webapp/src/main/webapp/WEB-INF/classes/db/psql/scopes.sql @@ -0,0 +1,35 @@ +-- +-- Turn off autocommit and start a transaction so that we can use the temp tables +-- + +--SET AUTOCOMMIT = OFF; + +START TRANSACTION; + +-- +-- Insert scope information into the temporary tables. +-- + +INSERT INTO system_scope_TEMP (scope, description, icon, restricted, default_scope) VALUES + ('openid', 'log in using your identity', 'user', false, true), + ('profile', 'basic profile information', 'list-alt', false, true), + ('email', 'email address', 'envelope', false, true), + ('address', 'physical address', 'home', false, true), + ('phone', 'telephone number', 'bell', false, true), + ('offline_access', 'offline access', 'time', false, false), + ('perun_api', 'calls to Perun API in your roles', 'cog', true, false) + ; + +-- +-- Merge the temporary scopes safely into the database. This is a two-step process to keep scopes from being created on every startup with a persistent store. +-- + +INSERT INTO system_scope (scope, description, icon, restricted, default_scope) + SELECT scope, description, icon, restricted, default_scope FROM system_scope_TEMP + ON CONFLICT(scope) + DO NOTHING; + +COMMIT; + +--SET AUTOCOMMIT = ON; + diff --git a/openid-connect-server-webapp/src/main/webapp/WEB-INF/crypto-config.xml b/perun-oidc-server-webapp/src/main/webapp/WEB-INF/crypto-config.xml similarity index 88% rename from openid-connect-server-webapp/src/main/webapp/WEB-INF/crypto-config.xml rename to perun-oidc-server-webapp/src/main/webapp/WEB-INF/crypto-config.xml index c1e47a8dc..933b5c333 100644 --- a/openid-connect-server-webapp/src/main/webapp/WEB-INF/crypto-config.xml +++ b/perun-oidc-server-webapp/src/main/webapp/WEB-INF/crypto-config.xml @@ -30,17 +30,17 @@ http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-4.3.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.3.xsd"> - + - + - + diff --git a/perun-oidc-server-webapp/src/main/webapp/WEB-INF/data-context.xml b/perun-oidc-server-webapp/src/main/webapp/WEB-INF/data-context.xml new file mode 100644 index 000000000..b484eb6c9 --- /dev/null +++ b/perun-oidc-server-webapp/src/main/webapp/WEB-INF/data-context.xml @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/openid-connect-server-webapp/src/main/webapp/WEB-INF/endpoint-config.xml b/perun-oidc-server-webapp/src/main/webapp/WEB-INF/endpoint-config.xml similarity index 69% rename from openid-connect-server-webapp/src/main/webapp/WEB-INF/endpoint-config.xml rename to perun-oidc-server-webapp/src/main/webapp/WEB-INF/endpoint-config.xml index 14fbcf2ea..44390d5de 100644 --- a/openid-connect-server-webapp/src/main/webapp/WEB-INF/endpoint-config.xml +++ b/perun-oidc-server-webapp/src/main/webapp/WEB-INF/endpoint-config.xml @@ -29,6 +29,18 @@ http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.3.xsd"> - + + + + + + + + + diff --git a/openid-connect-server-webapp/src/main/webapp/WEB-INF/jpa-config.xml b/perun-oidc-server-webapp/src/main/webapp/WEB-INF/jpa-config.xml similarity index 98% rename from openid-connect-server-webapp/src/main/webapp/WEB-INF/jpa-config.xml rename to perun-oidc-server-webapp/src/main/webapp/WEB-INF/jpa-config.xml index 592d56a2e..4cbd44c60 100644 --- a/openid-connect-server-webapp/src/main/webapp/WEB-INF/jpa-config.xml +++ b/perun-oidc-server-webapp/src/main/webapp/WEB-INF/jpa-config.xml @@ -34,7 +34,7 @@ - + diff --git a/openid-connect-server-webapp/src/main/webapp/WEB-INF/local-config.xml b/perun-oidc-server-webapp/src/main/webapp/WEB-INF/local-config.xml similarity index 100% rename from openid-connect-server-webapp/src/main/webapp/WEB-INF/local-config.xml rename to perun-oidc-server-webapp/src/main/webapp/WEB-INF/local-config.xml diff --git a/openid-connect-server-webapp/src/main/webapp/WEB-INF/locale-config.xml b/perun-oidc-server-webapp/src/main/webapp/WEB-INF/locale-config.xml similarity index 84% rename from openid-connect-server-webapp/src/main/webapp/WEB-INF/locale-config.xml rename to perun-oidc-server-webapp/src/main/webapp/WEB-INF/locale-config.xml index 60cdb6b0f..7f6e95dc7 100644 --- a/openid-connect-server-webapp/src/main/webapp/WEB-INF/locale-config.xml +++ b/perun-oidc-server-webapp/src/main/webapp/WEB-INF/locale-config.xml @@ -19,11 +19,11 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd"> - + - + diff --git a/openid-connect-server-webapp/src/main/webapp/WEB-INF/user-context.xml b/perun-oidc-server-webapp/src/main/webapp/WEB-INF/server-config.xml similarity index 63% rename from openid-connect-server-webapp/src/main/webapp/WEB-INF/user-context.xml rename to perun-oidc-server-webapp/src/main/webapp/WEB-INF/server-config.xml index 86e4be23c..e28024d45 100644 --- a/openid-connect-server-webapp/src/main/webapp/WEB-INF/user-context.xml +++ b/perun-oidc-server-webapp/src/main/webapp/WEB-INF/server-config.xml @@ -30,29 +30,18 @@ http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-4.3.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.3.xsd"> - - - - - - - - - + + + + + + + + + + + + - - - - - - - - - - - - - - - diff --git a/openid-connect-server-webapp/src/main/webapp/WEB-INF/spring-servlet.xml b/perun-oidc-server-webapp/src/main/webapp/WEB-INF/spring-servlet.xml similarity index 100% rename from openid-connect-server-webapp/src/main/webapp/WEB-INF/spring-servlet.xml rename to perun-oidc-server-webapp/src/main/webapp/WEB-INF/spring-servlet.xml diff --git a/openid-connect-server-webapp/src/main/webapp/WEB-INF/tags/actionmenu.tag b/perun-oidc-server-webapp/src/main/webapp/WEB-INF/tags/actionmenu.tag similarity index 100% rename from openid-connect-server-webapp/src/main/webapp/WEB-INF/tags/actionmenu.tag rename to perun-oidc-server-webapp/src/main/webapp/WEB-INF/tags/actionmenu.tag diff --git a/perun-oidc-server-webapp/src/main/webapp/WEB-INF/tags/bbmri/footer.tag b/perun-oidc-server-webapp/src/main/webapp/WEB-INF/tags/bbmri/footer.tag new file mode 100644 index 000000000..e6d160f0b --- /dev/null +++ b/perun-oidc-server-webapp/src/main/webapp/WEB-INF/tags/bbmri/footer.tag @@ -0,0 +1,25 @@ +<%@ tag pageEncoding="UTF-8" trimDirectiveWhitespaces="true" %> +<%@ attribute name="js" required="false"%> +<%@ attribute name="baseURL" required="true"%> +<%@ attribute name="samlResourcesURL" required="true"%> +<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> +<%@ taglib prefix="t" tagdir="/WEB-INF/tags/common" %> + + + diff --git a/perun-oidc-server-webapp/src/main/webapp/WEB-INF/tags/bbmri/header.tag b/perun-oidc-server-webapp/src/main/webapp/WEB-INF/tags/bbmri/header.tag new file mode 100644 index 000000000..aeb0a8b7e --- /dev/null +++ b/perun-oidc-server-webapp/src/main/webapp/WEB-INF/tags/bbmri/header.tag @@ -0,0 +1,22 @@ +<%@ tag pageEncoding="UTF-8" trimDirectiveWhitespaces="true" %> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> +<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> +<%@ taglib prefix="o" tagdir="/WEB-INF/tags/common" %> +<%@ attribute name="title" required="true" %> +<%@ attribute name="reqURL" required="true" %> +<%@ attribute name="baseURL" required="true" %> +<%@ attribute name="samlResourcesURL" required="true" %> +<%@ attribute name="cssLinks" required="true" type="java.util.ArrayList" %> + + + + + + + + + + + + + diff --git a/perun-oidc-server-webapp/src/main/webapp/WEB-INF/tags/ceitec/footer.tag b/perun-oidc-server-webapp/src/main/webapp/WEB-INF/tags/ceitec/footer.tag new file mode 100644 index 000000000..124fc6fb0 --- /dev/null +++ b/perun-oidc-server-webapp/src/main/webapp/WEB-INF/tags/ceitec/footer.tag @@ -0,0 +1,26 @@ +<%@ tag pageEncoding="UTF-8" trimDirectiveWhitespaces="true" %> +<%@ attribute name="js" required="false"%> +<%@ attribute name="baseURL" required="true"%> +<%@ attribute name="samlResourcesURL" required="true"%> +<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> +<%@ taglib prefix="t" tagdir="/WEB-INF/tags/common" %> + + + + + diff --git a/perun-oidc-server-webapp/src/main/webapp/WEB-INF/tags/ceitec/header.tag b/perun-oidc-server-webapp/src/main/webapp/WEB-INF/tags/ceitec/header.tag new file mode 100644 index 000000000..4214110df --- /dev/null +++ b/perun-oidc-server-webapp/src/main/webapp/WEB-INF/tags/ceitec/header.tag @@ -0,0 +1,22 @@ +<%@ tag pageEncoding="UTF-8" trimDirectiveWhitespaces="true" %> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> +<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> +<%@ taglib prefix="o" tagdir="/WEB-INF/tags/common" %> +<%@ attribute name="title" required="true" %> +<%@ attribute name="reqURL" required="true" %> +<%@ attribute name="baseURL" required="true" %> +<%@ attribute name="samlResourcesURL" required="true" %> +<%@ attribute name="cssLinks" required="true" type="java.util.ArrayList" %> + + + + + + + + + + + + + diff --git a/perun-oidc-server-webapp/src/main/webapp/WEB-INF/tags/cesnet/footer.tag b/perun-oidc-server-webapp/src/main/webapp/WEB-INF/tags/cesnet/footer.tag new file mode 100644 index 000000000..e84472bb5 --- /dev/null +++ b/perun-oidc-server-webapp/src/main/webapp/WEB-INF/tags/cesnet/footer.tag @@ -0,0 +1,50 @@ +<%@ tag pageEncoding="UTF-8" trimDirectiveWhitespaces="true" %> +<%@ attribute name="js" required="false"%> +<%@ attribute name="baseURL" required="true"%> +<%@ attribute name="samlResourcesURL" required="true"%> +<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> +<%@ taglib prefix="t" tagdir="/WEB-INF/tags/common" %> + + + diff --git a/perun-oidc-server-webapp/src/main/webapp/WEB-INF/tags/cesnet/header.tag b/perun-oidc-server-webapp/src/main/webapp/WEB-INF/tags/cesnet/header.tag new file mode 100644 index 000000000..e25dce99c --- /dev/null +++ b/perun-oidc-server-webapp/src/main/webapp/WEB-INF/tags/cesnet/header.tag @@ -0,0 +1,22 @@ +<%@ tag pageEncoding="UTF-8" trimDirectiveWhitespaces="true" %> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> +<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> +<%@ taglib prefix="o" tagdir="/WEB-INF/tags/common" %> +<%@ attribute name="title" required="true" %> +<%@ attribute name="reqURL" required="true" %> +<%@ attribute name="baseURL" required="true" %> +<%@ attribute name="samlResourcesURL" required="true" %> +<%@ attribute name="cssLinks" required="true" type="java.util.ArrayList" %> + + + + + + + + + + + + + diff --git a/perun-oidc-server-webapp/src/main/webapp/WEB-INF/tags/common/attributesConsent.tag b/perun-oidc-server-webapp/src/main/webapp/WEB-INF/tags/common/attributesConsent.tag new file mode 100644 index 000000000..150501da8 --- /dev/null +++ b/perun-oidc-server-webapp/src/main/webapp/WEB-INF/tags/common/attributesConsent.tag @@ -0,0 +1,82 @@ +<%@ tag pageEncoding="UTF-8" trimDirectiveWhitespaces="true" + import="cz.muni.ics.oidc.server.elixir.GA4GHClaimSource" %> +<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> +<%@ taglib prefix="o" tagdir="/WEB-INF/tags" %> + + + ${langProps['no_scopes']} + + + + + + + + + + + + + + + + "> + ">${scopeValue} + + + + + "> + + + + + + + + + "> + ${claimKey}: + + + visible-md-inline-block + + ${subValue} + + + + + ${claim.value} + + + + + + + + <%= GA4GHClaimSource.parseAndVerifyVisa( + (String) jspContext.findAttribute("subValue")).getPrettyString() %> + + + ${subValue} + + + + + + ${claim.value} + + + + + + + + + + + \ No newline at end of file diff --git a/perun-oidc-server-webapp/src/main/webapp/WEB-INF/tags/common/consentButtons.tag b/perun-oidc-server-webapp/src/main/webapp/WEB-INF/tags/common/consentButtons.tag new file mode 100644 index 000000000..9b65cc499 --- /dev/null +++ b/perun-oidc-server-webapp/src/main/webapp/WEB-INF/tags/common/consentButtons.tag @@ -0,0 +1,22 @@ +<%@ tag pageEncoding="UTF-8" trimDirectiveWhitespaces="true" %> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> +<%@ taglib prefix="o" tagdir="/WEB-INF/tags" %> + + + + + + ${langProps['yes']} + + + + + + + ${langProps['no']} + + + + \ No newline at end of file diff --git a/perun-oidc-server-webapp/src/main/webapp/WEB-INF/tags/common/footer.tag b/perun-oidc-server-webapp/src/main/webapp/WEB-INF/tags/common/footer.tag new file mode 100644 index 000000000..7a9a97f96 --- /dev/null +++ b/perun-oidc-server-webapp/src/main/webapp/WEB-INF/tags/common/footer.tag @@ -0,0 +1,38 @@ +<%@ tag pageEncoding="UTF-8" trimDirectiveWhitespaces="true" %> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> +<%@ taglib prefix="o" tagdir="/WEB-INF/tags" %> +<%@ taglib prefix="elixir" tagdir="/WEB-INF/tags/elixir" %> +<%@ taglib prefix="cesnet" tagdir="/WEB-INF/tags/cesnet" %> +<%@ taglib prefix="bbmri" tagdir="/WEB-INF/tags/bbmri" %> +<%@ taglib prefix="ceitec" tagdir="/WEB-INF/tags/ceitec" %> +<%@ taglib prefix="europdx" tagdir="/WEB-INF/tags/europdx" %> +<%@ taglib prefix="muni" tagdir="/WEB-INF/tags/muni" %> +<%@ taglib prefix="t" tagdir="/WEB-INF/tags/common" %> +<%@ attribute name="baseURL" required="true" %> +<%@ attribute name="theme" required="true" %> + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/perun-oidc-server-webapp/src/main/webapp/WEB-INF/tags/common/header.tag b/perun-oidc-server-webapp/src/main/webapp/WEB-INF/tags/common/header.tag new file mode 100644 index 000000000..7814e0936 --- /dev/null +++ b/perun-oidc-server-webapp/src/main/webapp/WEB-INF/tags/common/header.tag @@ -0,0 +1,38 @@ +<%@ tag pageEncoding="UTF-8" trimDirectiveWhitespaces="true" %> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> +<%@ taglib prefix="o" tagdir="/WEB-INF/tags" %> +<%@ taglib prefix="elixir" tagdir="/WEB-INF/tags/elixir" %> +<%@ taglib prefix="cesnet" tagdir="/WEB-INF/tags/cesnet" %> +<%@ taglib prefix="bbmri" tagdir="/WEB-INF/tags/bbmri" %> +<%@ taglib prefix="ceitec" tagdir="/WEB-INF/tags/ceitec" %> +<%@ taglib prefix="europdx" tagdir="/WEB-INF/tags/europdx" %> +<%@ taglib prefix="muni" tagdir="/WEB-INF/tags/muni" %> +<%@ attribute name="title" required="true" %> +<%@ attribute name="reqURL" required="true" %> +<%@ attribute name="baseURL" required="true" %> +<%@ attribute name="theme" required="true" %> +<%@ attribute name="cssLinks" required="true" type="java.util.ArrayList" %> + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/perun-oidc-server-webapp/src/main/webapp/WEB-INF/tags/common/headerBody.tag b/perun-oidc-server-webapp/src/main/webapp/WEB-INF/tags/common/headerBody.tag new file mode 100644 index 000000000..6c6df4df3 --- /dev/null +++ b/perun-oidc-server-webapp/src/main/webapp/WEB-INF/tags/common/headerBody.tag @@ -0,0 +1,14 @@ +<%@ tag pageEncoding="UTF-8" trimDirectiveWhitespaces="true" %> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> +<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> +<%@ taglib prefix="o" tagdir="/WEB-INF/tags/common" %> +<%@ attribute name="logoURL" required="true" %> + + + + + + + + + diff --git a/perun-oidc-server-webapp/src/main/webapp/WEB-INF/tags/common/headerCssLinks.tag b/perun-oidc-server-webapp/src/main/webapp/WEB-INF/tags/common/headerCssLinks.tag new file mode 100644 index 000000000..23666ade5 --- /dev/null +++ b/perun-oidc-server-webapp/src/main/webapp/WEB-INF/tags/common/headerCssLinks.tag @@ -0,0 +1,7 @@ +<%@ tag pageEncoding="UTF-8" trimDirectiveWhitespaces="true" %> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> +<%@ attribute name="cssLinks" required="true" type="java.util.ArrayList" %> + + + + diff --git a/perun-oidc-server-webapp/src/main/webapp/WEB-INF/tags/common/headerInit.tag b/perun-oidc-server-webapp/src/main/webapp/WEB-INF/tags/common/headerInit.tag new file mode 100644 index 000000000..7060d202d --- /dev/null +++ b/perun-oidc-server-webapp/src/main/webapp/WEB-INF/tags/common/headerInit.tag @@ -0,0 +1,22 @@ +<%@ tag pageEncoding="UTF-8" trimDirectiveWhitespaces="true" %> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> +<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> +<%@ attribute name="title" required="true" %> +<%@ attribute name="reqURL" required="true" %> +<%@ attribute name="baseURL" required="true" %> +<%@ attribute name="samlResourcesURL" required="true" %> + + + + + + + + ${config.topbarTitle} - ${title} + + + + + + + diff --git a/perun-oidc-server-webapp/src/main/webapp/WEB-INF/tags/common/langbar.tag b/perun-oidc-server-webapp/src/main/webapp/WEB-INF/tags/common/langbar.tag new file mode 100644 index 000000000..89df64744 --- /dev/null +++ b/perun-oidc-server-webapp/src/main/webapp/WEB-INF/tags/common/langbar.tag @@ -0,0 +1,34 @@ +<%@ tag pageEncoding="UTF-8" trimDirectiveWhitespaces="true" %> +<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> +<%@ attribute name="lang" required="true" %> +<%@ attribute name="langsMap" required="true" type="java.util.Map" %> +<%@ attribute name="reqURL" required="true" %> + + + + + + + + + + + + + + + + + + + ${langEntry.value} + + + + + + + + + \ No newline at end of file diff --git a/perun-oidc-server-webapp/src/main/webapp/WEB-INF/tags/copyright.tag b/perun-oidc-server-webapp/src/main/webapp/WEB-INF/tags/copyright.tag new file mode 100644 index 000000000..605ff4616 --- /dev/null +++ b/perun-oidc-server-webapp/src/main/webapp/WEB-INF/tags/copyright.tag @@ -0,0 +1,11 @@ +<%@ tag pageEncoding="UTF-8" import="cz.muni.ics.oidc.server.configurations.PerunOidcConfig" trimDirectiveWhitespaces="true" %> +<%@ tag import="org.springframework.web.context.support.WebApplicationContextUtils" %> +<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> + +<% + PerunOidcConfig perunOidcConfig = WebApplicationContextUtils.getWebApplicationContext(application).getBean("perunOidcConfig", PerunOidcConfig.class); +%> +Powered by +Perun MITREid <%=perunOidcConfig.getPerunOIDCVersion()%> +© 2017 The MIT Internet Trust Consortium.. diff --git a/perun-oidc-server-webapp/src/main/webapp/WEB-INF/tags/elixir/footer.tag b/perun-oidc-server-webapp/src/main/webapp/WEB-INF/tags/elixir/footer.tag new file mode 100644 index 000000000..d0d11980e --- /dev/null +++ b/perun-oidc-server-webapp/src/main/webapp/WEB-INF/tags/elixir/footer.tag @@ -0,0 +1,27 @@ +<%@ tag pageEncoding="UTF-8" trimDirectiveWhitespaces="true" %> +<%@ attribute name="js" required="false"%> +<%@ attribute name="baseURL" required="true"%> +<%@ attribute name="samlResourcesURL" required="true"%> +<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> +<%@ taglib prefix="t" tagdir="/WEB-INF/tags/common" %> + + + diff --git a/perun-oidc-server-webapp/src/main/webapp/WEB-INF/tags/elixir/header.tag b/perun-oidc-server-webapp/src/main/webapp/WEB-INF/tags/elixir/header.tag new file mode 100644 index 000000000..33260a391 --- /dev/null +++ b/perun-oidc-server-webapp/src/main/webapp/WEB-INF/tags/elixir/header.tag @@ -0,0 +1,22 @@ +<%@ tag pageEncoding="UTF-8" trimDirectiveWhitespaces="true" %> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> +<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> +<%@ taglib prefix="o" tagdir="/WEB-INF/tags/common" %> +<%@ attribute name="title" required="true" %> +<%@ attribute name="reqURL" required="true" %> +<%@ attribute name="baseURL" required="true" %> +<%@ attribute name="samlResourcesURL" required="true" %> +<%@ attribute name="cssLinks" required="true" type="java.util.ArrayList" %> + + + + + + + + + + + + + diff --git a/perun-oidc-server-webapp/src/main/webapp/WEB-INF/tags/europdx/footer.tag b/perun-oidc-server-webapp/src/main/webapp/WEB-INF/tags/europdx/footer.tag new file mode 100644 index 000000000..14fd3f1c7 --- /dev/null +++ b/perun-oidc-server-webapp/src/main/webapp/WEB-INF/tags/europdx/footer.tag @@ -0,0 +1,35 @@ +<%@ tag pageEncoding="UTF-8" trimDirectiveWhitespaces="true" %> +<%@ attribute name="js" required="false"%> +<%@ attribute name="baseURL" required="true"%> +<%@ attribute name="samlResourcesURL" required="true"%> +<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> +<%@ taglib prefix="t" tagdir="/WEB-INF/tags/common" %> + + + diff --git a/perun-oidc-server-webapp/src/main/webapp/WEB-INF/tags/europdx/header.tag b/perun-oidc-server-webapp/src/main/webapp/WEB-INF/tags/europdx/header.tag new file mode 100644 index 000000000..5866e05fe --- /dev/null +++ b/perun-oidc-server-webapp/src/main/webapp/WEB-INF/tags/europdx/header.tag @@ -0,0 +1,22 @@ +<%@ tag pageEncoding="UTF-8" trimDirectiveWhitespaces="true" %> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> +<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> +<%@ taglib prefix="o" tagdir="/WEB-INF/tags/common" %> +<%@ attribute name="title" required="true" %> +<%@ attribute name="reqURL" required="true" %> +<%@ attribute name="baseURL" required="true" %> +<%@ attribute name="samlResourcesURL" required="true" %> +<%@ attribute name="cssLinks" required="true" type="java.util.ArrayList" %> + + + + + + + + + + + + + diff --git a/openid-connect-server-webapp/src/main/webapp/WEB-INF/tags/footer.tag b/perun-oidc-server-webapp/src/main/webapp/WEB-INF/tags/footer.tag similarity index 100% rename from openid-connect-server-webapp/src/main/webapp/WEB-INF/tags/footer.tag rename to perun-oidc-server-webapp/src/main/webapp/WEB-INF/tags/footer.tag diff --git a/openid-connect-server-webapp/src/main/webapp/WEB-INF/tags/header.tag b/perun-oidc-server-webapp/src/main/webapp/WEB-INF/tags/header.tag similarity index 100% rename from openid-connect-server-webapp/src/main/webapp/WEB-INF/tags/header.tag rename to perun-oidc-server-webapp/src/main/webapp/WEB-INF/tags/header.tag diff --git a/perun-oidc-server-webapp/src/main/webapp/WEB-INF/tags/muni/footer.tag b/perun-oidc-server-webapp/src/main/webapp/WEB-INF/tags/muni/footer.tag new file mode 100644 index 000000000..8d0bc5487 --- /dev/null +++ b/perun-oidc-server-webapp/src/main/webapp/WEB-INF/tags/muni/footer.tag @@ -0,0 +1,17 @@ +<%@ tag pageEncoding="UTF-8" trimDirectiveWhitespaces="true" %> + + + + + + + + +
${langProps['no_scopes']}