Merge branch 'master' into ft/e2e-test

# Conflicts:
#	.gitignore
#	docker-compose.yml
This commit is contained in:
ggmaleva 2022-04-21 19:10:45 +03:00
commit 088eb53975
12 changed files with 332 additions and 8 deletions

1
.gitignore vendored
View File

@ -2,3 +2,4 @@
/clickhouse/data/
/.idea/
/clickhouse/log/
/tmp/

View File

@ -80,7 +80,7 @@ services:
- /tmp/docker/riak/data:/etc/riak/schemas
clickhouse:
image: yandex/clickhouse-server:19.17.6.36
image: yandex/clickhouse-server:20.6.7.4
# image: lunalabsltd/clickhouse-server:20.6.7.4-arm
hostname: clickhouse
container_name: clickhouse
@ -176,6 +176,23 @@ services:
volumes:
- ./log-java:/opt/trusted-tokens-manager/tmp
fraudbusters-api:
image: ghcr.io/valitydev/fraudbusters-api:sha-2c6be00
hostname: fraudbusters-api
container_name: fraudbusters-api
environment:
management.security.enabled: 'false'
logging.config: "tmp/logback-test.xml"
fraudbusters.service.payment.url: 'http://fraudbusters:8022/fraud_payment/v1/'
fraudbusters.service.inspector.url: 'http://fraudbusters:8022/fraud_inspector/v1'
server.port: "8080"
depends_on:
- fraudbusters
ports:
- 9999:8080
volumes:
- ./log-java:/opt/fraudbusters-api/tmp
fraudbusters:
image: ghcr.io/valitydev/fraudbusters:sha-676a876
hostname: fraudbusters
@ -197,6 +214,11 @@ services:
load.isTrusted.enabled: 'false'
trusted.tokens.url: 'http://trusted-tokens-manager:8022/trusted/tokens'
dgraph.service.enabled: 'false'
kafka.topic.group-list: 'group_list'
kafka.topic.group-reference: 'group_reference'
kafka.listen.result.concurrency: 7
kafka.max.poll.records: 1
kafka.max.backoff.interval: 1000
depends_on:
- clickhouse
- broker
@ -221,7 +243,6 @@ services:
fraudbusters.service.payment.url: 'http://fraudbusters:8022/fraud_payment/v1/'
fraudbusters.service.inspector.url: 'http://fraudbusters:8022/fraud_inspector/v1'
server.port: "8080"
server.tomcat.connection-timeout: 15000
depends_on:
- fraudbusters
ports:
@ -250,16 +271,19 @@ services:
container_name: fb-management
environment:
kafka.bootstrap-servers: "broker:9092"
kafka.wblist.topic.command: "wb-list-command"
kafka.wblist.topic.event.sink: "wb-list-event-sink"
kafka.fraudbusters.template: "template"
kafka.fraudbusters.reference: "template_reference"
kafka.topic.wblist.command: "wb-list-command"
kafka.topic.wblist.event.sink: "wb-list-event-sink"
kafka.topic.fraudbusters.payment.template: "template"
kafka.topic.fraudbusters.payment.reference: "template_reference"
kafka.topic.fraudbusters.payment.group.list: "group_list"
kafka.topic.fraudbusters.payment.group.reference: "group_reference"
spring.datasource.url: "jdbc:postgresql://postgres-fb:5432/fraudbusters"
logging.config: "./tmp/logback-test.xml"
management.metrics.binders.jvm.enabled: 'false'
service.payment.url: 'http://fraudbusters:8022/fraud_payment/v1/'
service.payment.networkTimeout: 15000
service.historical.url: 'http://fraudbusters:8022/historical_data/v1/'
service.historical.networkTimeout: 30000
service.notification.url: 'http://fb-notificator:8022/notification/v1'
service.notification-channel.url: 'http://fb-notificator:8022/notification-channel/v1'
service.notification-template.url: 'http://fb-notificator:8022/notification-template/v1'
@ -269,7 +293,6 @@ services:
keycloak.resource: "fraudbusters-app"
keycloak.auth-server-url: "http://keycloak:8080/auth"
cors.allowed-origins: "*"
server.tomcat.connection-timeout: 15000
ports:
- 8085:8080
depends_on:
@ -358,6 +381,8 @@ services:
environment:
KEYCLOAK_USER: "admin"
KEYCLOAK_PASSWORD: "admin"
volumes:
- ./keycloak/themes/fraudbusters:/opt/jboss/keycloak/themes/fraudbusters
e2e-test:
build: ./e2e-test

View File

@ -1301,7 +1301,7 @@
"strictTransportSecurity": "max-age=31536000; includeSubDomains"
},
"smtpServer": {},
"loginTheme": "keycloak",
"loginTheme": "fraudbusters",
"eventsEnabled": false,
"eventsListeners": [
"jboss-logging"

View File

@ -0,0 +1,52 @@
<#import "template.ftl" as layout>
<@layout.registrationLayout displayInfo=social.displayInfo; section>
<#if section = "title">
${msg("loginTitle",(realm.displayName!''))}
<#elseif section = "header">
<link href="https://fonts.googleapis.com/css?family=Muli" rel="stylesheet"/>
<link href="${url.resourcesPath}/img/favicon.png" rel="icon"/>
<script>
function togglePassword() {
var x = document.getElementById("password");
var v = document.getElementById("vi");
if (x.type === "password") {
x.type = "text";
v.src = "${url.resourcesPath}/img/eye.png";
} else {
x.type = "password";
v.src = "${url.resourcesPath}/img/eye-off.png";
}
}
</script>
<#elseif section = "form">
<div>
<img class="logo" src="${url.resourcesPath}/img/fraudbusters-logo.svg" alt="Fraudbusters">
</div>
<div class="box-container">
<#if realm.password>
<div>
<form id="kc-form-login" class="form" onsubmit="return true;" action="${url.loginAction}" method="post">
<input id="username" class="login-field" placeholder="${msg("username")}" type="text" name="username"
tabindex="1">
<div>
<label class="visibility" id="v" onclick="togglePassword()">
<img id="vi" src="${url.resourcesPath}/img/eye-off.png">
</label>
</div>
<input id="password" class="login-field" placeholder="${msg("password")}" type="password"
name="password" tabindex="2">
<input class="submit" type="submit" value="${msg("doLogIn")}" tabindex="3">
</form>
</div>
</#if>
<#if social.providers??>
<p class="para">${msg("selectAlternative")}</p>
<div id="social-providers">
<#list social.providers as p>
<input class="social-link-style" type="button" onclick="location.href='${p.loginUrl}';"
value="${p.displayName}"/>
</#list>
</div>
</#if>
</#if>
</@layout.registrationLayout>

View File

@ -0,0 +1,186 @@
body, html {
display: flex;
flex-direction: column;
flex: 1;
overflow: hidden;
min-height: 0;
font-size: 14px;
color: rgba(0, 0, 0, .87);
margin: 0;
height: 100%;
}
body {
margin: 0;
}
.login-content {
background-size: cover;
background-position: center;
min-height: 100%;
min-width: 320px;
display: flex;
justify-content: center;
flex-direction: column;
}
.login-content .box {
width: 448px;
border-radius: 8px;
background-color: #ffffff;
box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.24), 0 0 2px 0 rgba(0, 0, 0, 0.12);
margin: auto;
}
.login-content .box .box-container {
width: 100%;
padding-left: 32px;
}
.login-content .box .logo {
display: block;
margin-left: auto;
margin-right: auto;
margin-top: 30px;
width: 55px;
}
.login-content .box .form {
margin-left: 32px;
margin-top: 55px;
margin-bottom: -55px;
}
.login-content .box .login-field {
width: 320px;
height: 24px;
font-family: Roboto, "Helvetica Neue", sans-serif;
font-size: 14px;
font-weight: normal;
font-style: normal;
font-stretch: normal;
letter-spacing: -0.4px;
text-align: left;
color: #000000;
border: none;
border-bottom: 1px solid #ccc;
outline: none;
background-color: #fff;
}
.login-content .box input[type="text"]:focus, .login-content .box input[type="password"]:focus {
border-bottom: 2px solid #673ab7;
}
.login-content .box input[type="text"]:-webkit-autofill, .login-content .box input[type="password"]:-webkit-autofill {
box-shadow: 0 0 0px 1000px white inset;
}
.login-content .box .submit {
cursor: pointer;
width: 320px;
height: 36px;
border-radius: 4px;
background-color: #673ab7;
font-family: Roboto, "Helvetica Neue", sans-serif;
font-size: 14px;
font-weight: bold;
font-style: normal;
font-stretch: normal;
line-height: normal;
letter-spacing: normal;
text-align: center;
color: #ffffff;
border-style: none;
margin-top: 80px;
margin-bottom: 100px;
}
.login-content .box .submit:hover {
background-color: #5f35a8;
}
.login-content .box .visibility {
position: relative;
left: 296px;
top: 20px;
width: 24px;
height: 24px;
opacity: 0.54;
border: none;
}
.login-content .box .copyright {
min-width: 320px;
text-align: center;
font-size: 14px;
opacity: .54;
position: relative;
top: 50px;
}
.message-text {
width: 322px;
opacity: 0.87;
font-family: Roboto, "Helvetica Neue", sans-serif;
font-size: 14px;
font-weight: normal;
font-style: normal;
font-stretch: normal;
line-height: 1.3;
letter-spacing: -0.4px;
text-align: left;
color: #b8082a;
border: 0;
position: relative;
top: 250px;
left: 64px;
display: inline-flex;
align-items: center;
}
.identity-providers {
width: 270px;
font-family: Roboto, "Helvetica Neue", sans-serif;
font-size: 16px;
font-weight: 600;
font-style: normal;
font-stretch: normal;
line-height: 0.83;
letter-spacing: -0.4px;
text-align: left;
color: #0055B8;
margin-left: 32px;
margin-top: 20px;
}
.login-content .box .social-link-style {
width: 320px;
height: 36px;
border-radius: 4px;
background-color: var(--white);
font-family: Roboto, "Helvetica Neue", sans-serif;
font-size: 14px;
font-weight: bold;
font-style: normal;
font-stretch: normal;
line-height: normal;
letter-spacing: normal;
text-align: center;
color: #673ab7;
border-style: solid;
border-color: #673ab7;
margin-top: 0px;
margin-left: 30px;
margin-bottom: 50px;
}
.login-content .box .para {
font-family: Roboto, "Helvetica Neue", sans-serif;
font-size: 14px;
margin-left: 30px;
}
.alert.alert-error {
height: 0;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 692 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 639 B

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

@ -0,0 +1,36 @@
<#macro registrationLayout bodyClass="" displayInfo=false displayMessage=true>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="robots" content="noindex, nofollow">
<title><#nested "title"></title>
<#if properties.styles?has_content>
<#list properties.styles?split(' ') as style>
<link href="${url.resourcesPath}/${style}" rel="stylesheet" />
</#list>
</#if>
</head>
<body>
<#nested "header">
<div class="login-content" style="background-image: url(&quot;${url.resourcesPath}/img/background.jpeg&quot;);">
<div class="box">
<#if displayMessage && message?has_content>
<div class="alert alert-${message.type}">
<#if message.type = 'success'><span class="${properties.kcFeedbackSuccessIcon!}"></span></#if>
<#if message.type = 'warning'><span class="${properties.kcFeedbackWarningIcon!}"></span></#if>
<#if message.type = 'error'><span class="${properties.kcFeedbackErrorIcon!}"></span></#if>
<#if message.type = 'info'><span class="${properties.kcFeedbackInfoIcon!}"></span></#if>
<span class="message-text">${message.summary?no_esc}</span>
</div>
</#if>
<#nested "form">
</div>
</div>
</body>
</html>
</#macro>

View File

@ -0,0 +1,8 @@
parent=keycloak
import=common/keycloak
styles=css/login.css
kcFeedbackErrorIcon=pficon pficon-error-circle-o
kcFeedbackWarningIcon=pficon pficon-warning-triangle-o
kcFeedbackSuccessIcon=pficon pficon-ok
kcFeedbackInfoIcon=pficon pficon-info