Skip to content
Snippets Groups Projects
Commit 6e349988 authored by Rohith's avatar Rohith
Browse files

- shifting to version v1.0.0-rc5

- adding a changelog
- fixed the forbidden page bug
- added the templates to the docker base template
parent 65a0301d
Branches
Tags
No related merge requests found
#### **1.0.0-rc5 (March 15th, 2016)**
FEATURES:
* Added the realm access roles for keycloak, beforehand the user contect
was only parses roles which were from client applications
BUGS:
* Fixed the gitlab-ci build scripts
* Fixed the custom forbidden page bug
\ No newline at end of file
...@@ -4,9 +4,10 @@ MAINTAINER Rohith <gambol99@gmail.com> ...@@ -4,9 +4,10 @@ MAINTAINER Rohith <gambol99@gmail.com>
RUN apk update && \ RUN apk update && \
apk add ca-certificates apk add ca-certificates
ADD bin/keycloak-proxy /opt/bin/keycloak-proxy ADD templates/ opt/templates
RUN chmod +x /opt/bin/keycloak-proxy ADD bin/keycloak-proxy /opt/keycloak-proxy
RUN chmod +x /opt/keycloak-proxy
WORKDIR "/opt/bin" WORKDIR "/opt"
ENTRYPOINT [ "/opt/bin/keycloak-proxy" ] ENTRYPOINT [ "/opt/keycloak-proxy" ]
...@@ -22,7 +22,7 @@ import ( ...@@ -22,7 +22,7 @@ import (
const ( const (
prog = "keycloak-proxy" prog = "keycloak-proxy"
version = "v1.0.0-rc3" version = "v1.0.0-rc5"
author = "Rohith" author = "Rohith"
email = "gambol99@gmail.com" email = "gambol99@gmail.com"
description = "is a proxy using the keycloak service for auth and authorization" description = "is a proxy using the keycloak service for auth and authorization"
......
...@@ -24,6 +24,7 @@ import ( ...@@ -24,6 +24,7 @@ import (
"net/http" "net/http"
"net/http/httputil" "net/http/httputil"
"net/url" "net/url"
"path"
"strings" "strings"
"sync" "sync"
"time" "time"
...@@ -149,6 +150,7 @@ func (r *KeycloakProxy) initializeTemplates() { ...@@ -149,6 +150,7 @@ func (r *KeycloakProxy) initializeTemplates() {
} }
if len(list) > 0 { if len(list) > 0 {
log.Infof("loading the custom templates: %s", strings.Join(list, ","))
r.router.LoadHTMLFiles(list...) r.router.LoadHTMLFiles(list...)
} }
} }
...@@ -207,7 +209,7 @@ func (r KeycloakProxy) redirectToURL(url string, cx *gin.Context) { ...@@ -207,7 +209,7 @@ func (r KeycloakProxy) redirectToURL(url string, cx *gin.Context) {
func (r KeycloakProxy) accessForbidden(cx *gin.Context) { func (r KeycloakProxy) accessForbidden(cx *gin.Context) {
// step: do we have a custom forbidden page // step: do we have a custom forbidden page
if r.config.hasForbiddenPage() { if r.config.hasForbiddenPage() {
cx.HTML(http.StatusForbidden, r.config.ForbiddenPage, r.config.TagData) cx.HTML(http.StatusForbidden, path.Base(r.config.ForbiddenPage), r.config.TagData)
cx.Abort() cx.Abort()
return return
} }
......
<!DOCTYPE html>
<html> <html>
<head>
<meta charset="UTF-8">
<title>403 - Access Forbidden</title>
<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
<script src="https://code.jquery.com/jquery-1.11.3.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
<style>
.oops {
font-size: 9em;
letter-spacing: 2px;
}
.message {
font-size: 3em;
}
</style>
</head>
<body> <body>
Access Forbidden <div class="container text-center">
<div class="row vcenter" style="margin-top: 20%;">
<div class="col-md-12">
<div class="error-template">
<h1 class="oops">Oops!</h1>
<h2 class="message">503 Permission Denied</h2>
<div class="error-details">
Sorry, you do not have accces to this page, please consult with the application administrator
</div>
</div>
</div>
</div>
</div>
</body> </body>
</html> </html>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment