Skip to content

Commit

Permalink
Merge branch 'wso2:master' into Integration-test-for-API-Key-authenti…
Browse files Browse the repository at this point in the history
…cation-for-WebSocket-API-1
  • Loading branch information
thisaltennakoon authored Feb 20, 2024
2 parents 5cc388a + ead6ff4 commit 3fa3f8e
Show file tree
Hide file tree
Showing 112 changed files with 5,414 additions and 967 deletions.
2 changes: 1 addition & 1 deletion modules/callhome/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<parent>
<groupId>org.wso2.am</groupId>
<artifactId>am-parent</artifactId>
<version>4.3.0-SNAPSHOT</version>
<version>4.3.1-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
8 changes: 8 additions & 0 deletions modules/distribution/apim-is-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,14 @@
<outputDirectory>target/apim-is-plugin-resources/webapps</outputDirectory>
<destFileName>keymanager-operations.war</destFileName>
</artifactItem>
<artifactItem>
<groupId>org.wso2.km.ext.wso2is</groupId>
<artifactId>wso2is.key.manager.tokenpersistence</artifactId>
<version>${wso2is.km.version}</version>
<type>jar</type>
<overWrite>true</overWrite>
<outputDirectory>target/apim-is-plugin-resources/dropins</outputDirectory>
</artifactItem>
</artifactItems>
</configuration>
</execution>
Expand Down
2 changes: 1 addition & 1 deletion modules/distribution/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<groupId>org.wso2.am</groupId>
<artifactId>am-parent</artifactId>
<version>4.3.0-SNAPSHOT</version>
<version>4.3.1-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion modules/distribution/product/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<groupId>org.wso2.am</groupId>
<artifactId>am-distribution-parent</artifactId>
<version>4.3.0-SNAPSHOT</version>
<version>4.3.1-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
14 changes: 14 additions & 0 deletions modules/distribution/product/src/main/assembly/bin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1249,6 +1249,20 @@
<fileMode>644</fileMode>
</file>

<file>
<source>src/main/startup-scripts/fips.sh</source>
<outputDirectory>wso2am-${pom.version}/bin/</outputDirectory>
<filtered>true</filtered>
<fileMode>755</fileMode>
</file>

<file>
<source>src/main/startup-scripts/fips.bat</source>
<outputDirectory>wso2am-${pom.version}/bin/</outputDirectory>
<filtered>true</filtered>
<fileMode>755</fileMode>
</file>

<file>
<source>src/main/startup-scripts/profileSetup.sh</source>
<outputDirectory>wso2am-${pom.version}/bin/</outputDirectory>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ product.key=AM
product.version=4.3.0
product.wum.name=wso2am

carbon.version=4.8.1
carbon.version=4.9.26.alpha1
am.version=4.3.0
default.server.role=APIManager
bundle.creators=org.wso2.carbon.mediator.bridge.MediatorBundleCreator
3 changes: 2 additions & 1 deletion modules/distribution/product/src/main/conf/deployment.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type = "database_unique_id"

[database.apim_db]
type = "h2"
url = "jdbc:h2:./repository/database/WSO2AM_DB;AUTO_SERVER=TRUE;DB_CLOSE_ON_EXIT=FALSE"
url = "jdbc:h2:./repository/database/WSO2AM_DB;DB_CLOSE_ON_EXIT=FALSE"
username = "wso2carbon"
password = "wso2carbon"

Expand Down Expand Up @@ -52,6 +52,7 @@ key_password = "wso2carbon"
[[apim.gateway.environment]]
name = "Default"
type = "hybrid"
gateway_type = "Regular"
provider = "wso2"
display_in_api_console = true
description = "This is a hybrid gateway that handles both production and sandbox token traffic."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,7 @@
name="password"
value=""
autocomplete="off"
required
tabindex="2"
placeholder="<%=AuthenticationEndpointUtil.i18n(resourceBundle, "password")%>"
data-testid="login-page-password-input"
Expand Down Expand Up @@ -403,7 +404,7 @@
name="chkRemember"
data-testid="login-page-remember-me-checkbox"
>
<label><%=AuthenticationEndpointUtil.i18n(resourceBundle, "remember.me")%></label>
<label for="chkRemember"><%=AuthenticationEndpointUtil.i18n(resourceBundle, "remember.me")%></label>
</div>
</div>
<input type="hidden" name="sessionDataKey" value='<%=Encode.forHtmlAttribute
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@
~ under the License.
--%>

<!-- page content -->
<%-- page content --%>
<div class="ui grid">
<div class="two column row"></div>
<div class="four wide computer four wide tablet column">
<div id="toc" class="ui segment toc"></div>
</div>
<div class="twelve wide computer twelve wide tablet column">
<!-- content -->
<%-- content --%>
<div>
<div>
<h1>
Expand Down Expand Up @@ -174,7 +174,7 @@
<%-- /Customizable content --%>
</div>
</div>
<!-- /content -->
<%-- /content --%>
</div>
</div>
</div>
10 changes: 5 additions & 5 deletions modules/distribution/product/src/main/extensions/error.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@
layoutData.put("containerSize", "large");
%>
<!doctype html>
<html>
<html lang="en-US">
<head>
<!-- header -->
<%-- header --%>
<%
File headerFile = new File(getServletContext().getRealPath("extensions/header.jsp"));
if (headerFile.exists()) {
Expand All @@ -62,7 +62,7 @@
<body class="login-portal layout recovery-layout">
<layout:main layoutName="<%= layout %>" layoutFileRelativePath="<%= layoutFileRelativePath %>" data="<%= layoutData %>" >
<layout:component componentName="ProductHeader" >
<!-- product-title -->
<%-- product-title --%>
<%
File productTitleFile = new File(getServletContext().getRealPath("extensions/product-title.jsp"));
if (productTitleFile.exists()) {
Expand Down Expand Up @@ -102,7 +102,7 @@
</div>
</layout:component>
<layout:component componentName="ProductFooter" >
<!-- product-footer -->
<%-- product-footer --%>
<%
File productFooterFile = new File(getServletContext().getRealPath("extensions/product-footer.jsp"));
if (productFooterFile.exists()) {
Expand All @@ -114,7 +114,7 @@
</layout:component>
</layout:main>

<!-- footer -->
<%-- footer --%>
<%
File footerFile = new File(getServletContext().getRealPath("extensions/footer.jsp"));
if (footerFile.exists()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">

<link rel="icon" href="libs/themes/default/assets/images/favicon.ico" type="image/x-icon"/>
<link href="libs/themes/default/theme.2857d6ef.min.css" rel="stylesheet">
<link href="libs/themes/default/theme.70534561.min.css" rel="stylesheet">

<title><%=request.getAttribute("pageTitle")%></title>

Expand Down
43 changes: 27 additions & 16 deletions modules/distribution/product/src/main/extensions/login.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -97,13 +97,24 @@
String multiOptionURIParam = "";
if (localAuthenticatorNames.size() > 1 || idpAuthenticatorMapping != null && idpAuthenticatorMapping.size() > 1) {
String baseURL;
try {
baseURL = ServiceURLBuilder.create().addPath(request.getRequestURI()).build().getRelativePublicURL();
} catch (URLBuilderException e) {
request.setAttribute(STATUS, AuthenticationEndpointUtil.i18n(resourceBundle, "internal.error.occurred"));
request.setAttribute(STATUS_MSG, AuthenticationEndpointUtil.i18n(resourceBundle, "error.when.processing.authentication.request"));
request.getRequestDispatcher("error.do").forward(request, response);
return;
// Check whether authentication endpoint is hosted externally.
String isHostedExternally = application.getInitParameter("IsHostedExternally");
if (Boolean.parseBoolean(isHostedExternally)) {
String requestURI = request.getRequestURI();
if (StringUtils.isNotBlank(requestURI)) {
requestURI = requestURI.startsWith("/") ? requestURI : "/" + requestURI;
requestURI = requestURI.endsWith("/") ? requestURI.substring(0, requestURI.length() - 1) : requestURI;
}
baseURL = requestURI;
} else {
try {
baseURL = ServiceURLBuilder.create().addPath(request.getRequestURI()).build().getRelativePublicURL();
} catch (URLBuilderException e) {
request.setAttribute(STATUS, AuthenticationEndpointUtil.i18n(resourceBundle, "internal.error.occurred"));
request.setAttribute(STATUS_MSG, AuthenticationEndpointUtil.i18n(resourceBundle, "error.when.processing.authentication.request"));
request.getRequestDispatcher("error.do").forward(request, response);
return;
}
}
String queryParamString = request.getQueryString() != null ? ("?" + request.getQueryString()) : "";
Expand Down Expand Up @@ -193,7 +204,7 @@
<!doctype html>
<html>
<head>
<!-- header -->
<%-- header --%>
<%
File headerFile = new File(getServletContext().getRealPath("extensions/header.jsp"));
if (headerFile.exists()) {
Expand Down Expand Up @@ -222,7 +233,7 @@

<layout:main layoutName="<%= layout %>" layoutFileRelativePath="<%= layoutFileRelativePath %>" data="<%= layoutData %>" >
<layout:component componentName="ProductHeader" >
<!-- product-title -->
<%-- product-title --%>
<%
File productTitleFile = new File(getServletContext().getRealPath("extensions/product-title.jsp"));
if (productTitleFile.exists()) {
Expand Down Expand Up @@ -353,14 +364,14 @@
<div class="external-login blurring external-login-dimmer">
<div class="field">
<button
class="ui button fluid"
class="ui button secondary fluid"
onclick="handleNoDomain(this,
'<%=Encode.forJavaScriptAttribute(Encode.forUriComponent(idpName))%>',
'<%=Encode.forJavaScriptAttribute(Encode.forUriComponent(idpEntry.getValue()))%>')"
id="icon-<%=iconId%>"
title="<%=AuthenticationEndpointUtil.i18n(resourceBundle, "sign.in.with")%> <%=Encode.forHtmlAttribute(idpName)%>"
>
<img class="ui image" src="<%=Encode.forHtmlAttribute(imageURL)%>">
<img role="presentation" class="ui image" src="<%=Encode.forHtmlAttribute(imageURL)%>">
<span><%=AuthenticationEndpointUtil.i18n(resourceBundle, "sign.in.with")%> <%=Encode.forHtmlContent(idpName)%></span>
</button>
</div>
Expand All @@ -374,7 +385,7 @@
<button class="ui blue labeled icon button fluid"
onclick="handleNoDomain(this,
'<%=Encode.forJavaScriptAttribute(Encode.forUriComponent(idpEntry.getKey()))%>',
'IWAAuthenticator')"
'IwaNTLMAuthenticator')"
id="icon-<%=iconId%>"
title="<%=AuthenticationEndpointUtil.i18n(resourceBundle, "sign.in.with")%> IWA">
<%=AuthenticationEndpointUtil.i18n(resourceBundle, "sign.in.with")%> <strong>IWA</strong>
Expand Down Expand Up @@ -408,7 +419,7 @@
title="<%=AuthenticationEndpointUtil.i18n(resourceBundle, "sign.in.with")%>
<%=AuthenticationEndpointUtil.i18n(resourceBundle, "sign.in.with" )%>">
<i class="usb icon"></i>
<img src="libs/themes/default/assets/images/icons/fingerprint.svg" alt="Fido Logo" />
<img role="presentation" src="libs/themes/default/assets/images/icons/fingerprint.svg" alt="Fido Logo" />
<span>
<%=AuthenticationEndpointUtil.i18n(resourceBundle, "sign.in.with" )%>
<%=AuthenticationEndpointUtil.i18n(resourceBundle, "fido.authenticator" )%>
Expand All @@ -427,7 +438,7 @@
title="<%=AuthenticationEndpointUtil.i18n(resourceBundle, "sign.in.with")%>
<%=AuthenticationEndpointUtil.i18n(resourceBundle, "magic.link" )%>"
data-componentid="login-page-sign-in-with-magic-link">
<img class="ui image" src="libs/themes/default/assets/images/icons/magic-link-icon.svg" alt="Magic Link Logo" />
<img role="presentation" class="ui image" src="libs/themes/default/assets/images/icons/magic-link-icon.svg" alt="Magic Link Logo" />
<span>
<%=AuthenticationEndpointUtil.i18n(resourceBundle, "sign.in.with" )%>
<%=AuthenticationEndpointUtil.i18n(resourceBundle, "magic.link" )%>
Expand Down Expand Up @@ -461,7 +472,7 @@
</div>
</layout:component>
<layout:component componentName="ProductFooter" >
<!-- product-footer -->
<%-- product-footer --%>
<%
File productFooterFile = new File(getServletContext().getRealPath("extensions/product-footer.jsp"));
if (productFooterFile.exists()) {
Expand All @@ -473,7 +484,7 @@
</layout:component>
</layout:main>

<!-- footer -->
<%-- footer --%>
<%
File footerFile = new File(getServletContext().getRealPath("extensions/footer.jsp"));
if (footerFile.exists()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@
%>

<!doctype html>
<html>
<html lang="en-US">
<head>
<%
File headerFile = new File(getServletContext().getRealPath("extensions/header.jsp"));
Expand All @@ -131,7 +131,7 @@
<body class="login-portal layout recovery-layout">
<layout:main layoutName="<%= layout %>" layoutFileRelativePath="<%= layoutFileRelativePath %>" data="<%= layoutData %>" >
<layout:component componentName="ProductHeader" >
<!-- product-title -->
<%-- product-title --%>
<%
File productTitleFile = new File(getServletContext().getRealPath("extensions/product-title.jsp"));
if (productTitleFile.exists()) {
Expand All @@ -143,7 +143,7 @@
</layout:component>
<layout:component componentName="MainSection" >
<div class="ui segment">
<!-- page content -->
<%-- page content --%>
<h3 class="ui header">
<%=IdentityManagementEndpointUtil.i18n(recoveryResourceBundle, "Recover.password")%>
</h3>
Expand Down Expand Up @@ -275,7 +275,7 @@
</div>
</layout:component>
<layout:component componentName="ProductFooter" >
<!-- product-footer -->
<%-- product-footer --%>
<%
File productFooterFile = new File(getServletContext().getRealPath("extensions/product-footer.jsp"));
if (productFooterFile.exists()) {
Expand All @@ -287,7 +287,7 @@
</layout:component>
</layout:main>

<!-- footer -->
<%-- footer --%>
<%
File footerFile = new File(getServletContext().getRealPath("extensions/footer.jsp"));
if (footerFile.exists()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@
~ under the License.
--%>

<!-- page content -->
<%-- page content -->
<div class="ui grid">
<div class="two column row"></div>
<div class="four wide computer four wide tablet column">
<div id="toc" class="ui segment toc"></div>
</div>
<div class="twelve wide computer twelve wide tablet column">
<!-- content -->
<%-- content --%>
<div>
<div>
<h1>
Expand Down Expand Up @@ -141,7 +141,7 @@
<%-- /Customizable content --%>
</div>
</div>
<!-- /content -->
<%-- /content --%>
</div>
</div>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

<!-- localize.jsp MUST already be included in the calling script -->

<!-- footer -->
<%-- footer --%>
<footer class="footer" style="text-align: center">
<div class="container-fluid">
<p><%=request.getAttribute("footerText")%> | &copy;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
%>

<!doctype html>
<html>
<html lang="en-US">
<head>
<%
File headerFile = new File(getServletContext().getRealPath("extensions/header.jsp"));
Expand Down Expand Up @@ -134,7 +134,7 @@
</div>
</div>

<!-- footer -->
<%-- footer --%>
<%
File footerFile = new File(getServletContext().getRealPath("extensions/footer.jsp"));
if (footerFile.exists()) {
Expand Down
Loading

0 comments on commit 3fa3f8e

Please sign in to comment.