fix: improvements for login and oidc (#227)

* add csrf

* caching

* caching

* caching

* caching

* security headers

* csp and security headers

* error handler csp

* select user with display name

* csp

* user selection styling

* username to loginname

* regenerate grpc

* regenerate

* change to login name
This commit is contained in:
Livio Amstutz
2020-06-17 08:06:40 +02:00
committed by GitHub
parent dfe6d0deb4
commit 1c59d18fee
108 changed files with 19226 additions and 19220 deletions
@@ -95,7 +95,7 @@ h1 {
}
p {
font-width: 300;
font-weight: 300;
}
header {
@@ -151,9 +151,6 @@ button.primary {
button.primary:hover {
background-color: #f60075;
}
button > .sessionstate {
text-transform: lowercase;
}
input:not([type=radio]), select {
background-color: #252525;
@@ -200,6 +197,102 @@ form .actions .right {
form .actions button, form .actions a {
margin: 10px 0;
}
form button.clean {
border: none;
height: auto;
color: white;
text-align: left;
text-transform: unset;
display: flex;
padding: 15px;
}
form button.clean:hover {
border: none;
background-color: #252525;
}
form button.clean * {
font-weight: 300;
}
form .user-selection-list {
margin-bottom: 80px;
}
form button.user-selection .profile-image {
width: 100px;
height: 100px;
background-image: url("/resources/images/icon-user-dark.png");
}
@media only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (min--moz-device-pixel-ratio: 2), only screen and (-o-min-device-pixel-ratio: 2/1), only screen and (min-device-pixel-ratio: 2), only screen and (min-resolution: 192dpi), only screen and (min-resolution: 2dppx) {
form button.user-selection .profile-image {
background-image: url("/resources/images/[email protected]");
background-size: 100px 100px;
}
}
form button.user-selection:hover .profile-image {
background-image: url("/resources/images/icon-user-dark-hover.png");
}
@media only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (min--moz-device-pixel-ratio: 2), only screen and (-o-min-device-pixel-ratio: 2/1), only screen and (min-device-pixel-ratio: 2), only screen and (min-resolution: 192dpi), only screen and (min-resolution: 2dppx) {
form button.user-selection:hover .profile-image {
background-image: url("/resources/images/[email protected]");
background-size: 100px 100px;
}
}
form button.user-selection .sessionstate {
display: inline-block;
height: 20px;
width: 20px;
border-radius: 20px;
border-color: #595959;
border-style: solid;
border-width: 1px;
position: absolute;
bottom: 0px;
right: 10px;
}
form button.user-selection .sessionstate.sessionstate-0 {
background-color: #138D00;
}
form button.user-selection .sessionstate.sessionstate-1 {
background-color: #BC372E;
}
form button.user-selection > div {
position: relative;
}
form button.user-selection > div.names {
margin: 15px;
}
form button.user-selection > div.names .displayname {
font-size: 1.4rem;
}
form button.user-selection > div.names .loginname {
color: #898989;
}
.user-selection + form button.other-user {
margin-top: 80px;
}
form button.other-user .other-user-image {
width: 100px;
height: 75px;
background-image: url("/resources/images/icon-newuser-dark.png");
}
@media only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (min--moz-device-pixel-ratio: 2), only screen and (-o-min-device-pixel-ratio: 2/1), only screen and (min-device-pixel-ratio: 2), only screen and (min-resolution: 192dpi), only screen and (min-resolution: 2dppx) {
form button.other-user .other-user-image {
background-image: url("/resources/images/[email protected]");
background-size: 100px 75px;
}
}
form button.other-user:hover .other-user-image {
background-image: url("/resources/images/icon-newuser-dark-hover.png");
}
@media only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (min--moz-device-pixel-ratio: 2), only screen and (-o-min-device-pixel-ratio: 2/1), only screen and (min-device-pixel-ratio: 2), only screen and (min-resolution: 192dpi), only screen and (min-resolution: 2dppx) {
form button.other-user:hover .other-user-image {
background-image: url("/resources/images/[email protected]");
background-size: 100px 75px;
}
}
form button.other-user > div:nth-of-type(2) {
margin: 15px;
font-size: 1.4rem;
}
#copy-secret {
visibility: hidden;
@@ -209,11 +302,11 @@ form .actions button, form .actions a {
#qrcode {
text-align: center;
}
#qrcode svg rect[style*="fill:white"] {
fill: #282828 !important;
#qrcode svg rect.color {
fill: white;
}
#qrcode svg rect[style*="fill:black"] {
fill: white !important;
#qrcode svg rect.bg-color {
fill: #282828;
}
#secret .copy {
@@ -282,6 +375,48 @@ html button.primary {
html button.primary:hover {
background-color: #f60075;
}
html button.clean {
color: #282828;
}
html button.user-selection .profile-image {
background-image: url("/resources/images/icon-user-light.png");
}
@media only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (min--moz-device-pixel-ratio: 2), only screen and (-o-min-device-pixel-ratio: 2/1), only screen and (min-device-pixel-ratio: 2), only screen and (min-resolution: 192dpi), only screen and (min-resolution: 2dppx) {
html button.user-selection .profile-image {
background-image: url("/resources/images/[email protected]");
background-size: 100px 100px;
}
}
html button.user-selection:hover {
background-color: #252525;
}
html button.user-selection:hover .profile-image {
background-image: url("/resources/images/icon-user-light-hover.png");
}
@media only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (min--moz-device-pixel-ratio: 2), only screen and (-o-min-device-pixel-ratio: 2/1), only screen and (min-device-pixel-ratio: 2), only screen and (min-resolution: 192dpi), only screen and (min-resolution: 2dppx) {
html button.user-selection:hover .profile-image {
background-image: url("/resources/images/[email protected]");
background-size: 100px 100px;
}
}
html button.other-user .other-user-image {
background-image: url("/resources/images/icon-newuser-light.png");
}
@media only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (min--moz-device-pixel-ratio: 2), only screen and (-o-min-device-pixel-ratio: 2/1), only screen and (min-device-pixel-ratio: 2), only screen and (min-resolution: 192dpi), only screen and (min-resolution: 2dppx) {
html button.other-user .other-user-image {
background-image: url("/resources/images/[email protected]");
background-size: 100px 75px;
}
}
html button.other-user:hover .other-user-image {
background-image: url("/resources/images/icon-newuser-light-hover.png");
}
@media only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (min--moz-device-pixel-ratio: 2), only screen and (-o-min-device-pixel-ratio: 2/1), only screen and (min-device-pixel-ratio: 2), only screen and (min-resolution: 192dpi), only screen and (min-resolution: 2dppx) {
html button.other-user:hover .other-user-image {
background-image: url("/resources/images/[email protected]");
background-size: 100px 75px;
}
}
html input {
background-color: white;
color: #282828;