Skip to content

Commit

Permalink
core -> auth
Browse files Browse the repository at this point in the history
  • Loading branch information
alexeykazakov committed Jul 15, 2017
1 parent 7833ae6 commit e75b187
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 38 deletions.
2 changes: 1 addition & 1 deletion README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ coverage information for all tests.

== Configuration file

If no configuration file is specified when the core is started, these are the defaults.
If no configuration file is specified when the auth is started, these are the defaults.

[source,yaml]
.config.yaml
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ services:
POSTGRESQL_ADMIN_PASSWORD: mysecretpassword
networks:
- default
core:
auth:
image: fabric8-services/fabric8-auth:latest
command: -config /usr/local/alm/etc/config.yaml
environment:
Expand Down
2 changes: 1 addition & 1 deletion docs/development/README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
:sectnums:
:experimental:

This section of the documentation contains a guide for users who want to contribute code or documentation to the almigthy-core project.
This section of the documentation contains a guide for users who want to contribute code or documentation to the fabric8-auth project.

Code or documentation isn’t the only way to contribute. You can also link:https://github.com/fabric8-services/fabric8-auth/issues/new[report an issue].

Expand Down
8 changes: 4 additions & 4 deletions login/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"github.com/fabric8-services/fabric8-auth/app"
"github.com/fabric8-services/fabric8-auth/application"
"github.com/fabric8-services/fabric8-auth/auth"
coreerrors "github.com/fabric8-services/fabric8-auth/errors"
autherrors "github.com/fabric8-services/fabric8-auth/errors"
er "github.com/fabric8-services/fabric8-auth/errors"
"github.com/fabric8-services/fabric8-auth/jsonapi"
"github.com/fabric8-services/fabric8-auth/log"
Expand Down Expand Up @@ -143,7 +143,7 @@ func (keycloak *KeycloakOAuthProvider) Perform(ctx *app.AuthorizeLoginContext, c
"err": err,
}, "failed to create a user and KeyCloak identity using the access token")
switch err.(type) {
case coreerrors.UnauthorizedError:
case autherrors.UnauthorizedError:
if userNotApprovedRedirectURL != "" {
log.Debug(ctx, map[string]interface{}{
"user_not_approved_redirect_url": userNotApprovedRedirectURL,
Expand Down Expand Up @@ -268,7 +268,7 @@ func (keycloak *KeycloakOAuthProvider) Perform(ctx *app.AuthorizeLoginContext, c

stateID := uuid.NewV4()
if ctx.Link != nil && *ctx.Link {
// We need to save the "link" param so we don't lose it when redirect to sso for auth and back to core.
// We need to save the "link" param so we don't lose it when redirect to sso for auth and back to auth.
// TODO find a better place to save this param between redirects.
linkURL, err := url.Parse(*redirect)
if err != nil {
Expand Down Expand Up @@ -659,7 +659,7 @@ func (keycloak *KeycloakOAuthProvider) CreateOrUpdateKeycloakUser(accessToken st
return nil, nil, err
}
if !approved {
return nil, nil, coreerrors.NewUnauthorizedError(fmt.Sprintf("user '%s' is not approved", claims.Username))
return nil, nil, autherrors.NewUnauthorizedError(fmt.Sprintf("user '%s' is not approved", claims.Username))
}
user = new(account.User)
identity = &account.Identity{}
Expand Down
2 changes: 1 addition & 1 deletion migration/sql-files/README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
The purpose of this directory is to store all files that are relevant for
updating the database over time.

The SQL files themselves are packaged into the alm core binary with
The SQL files themselves are packaged into the alm auth binary with
link:https://github.com/jteeuwen/go-bindata[go-bindata].

The filenames of the SQL files have no meaning but we prefix them with the
Expand Down
54 changes: 27 additions & 27 deletions openshift/core.app.yaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
kind: Template
apiVersion: v1
metadata:
name: core
name: auth
objects:
- kind: DeploymentConfig
apiVersion: v1
metadata:
labels:
service: core
name: core
service: auth
name: auth
spec:
replicas: 4
selector:
service: core
service: auth
strategy:
resources:
limits:
Expand All @@ -27,93 +27,93 @@ objects:
template:
metadata:
labels:
service: core
service: auth
spec:
containers:
- image: registry.devshift.net/fabric8-services/fabric8-auth:${IMAGE_TAG}
env:
- name: AUTH_POSTGRES_HOST
valueFrom:
secretKeyRef:
name: core
name: auth
key: db.host
- name: AUTH_POSTGRES_PORT
valueFrom:
secretKeyRef:
name: core
name: auth
key: db.port
- name: AUTH_POSTGRES_USER
valueFrom:
secretKeyRef:
name: core
name: auth
key: db.user
- name: AUTH_POSTGRES_PASSWORD
valueFrom:
secretKeyRef:
name: core
name: auth
key: db.password
- name: AUTH_KEYCLOAK_REALM
valueFrom:
secretKeyRef:
name: core
name: auth
key: keycloak.realm
- name: AUTH_TOKEN_PUBLICKEY
valueFrom:
secretKeyRef:
name: core
name: auth
key: token.publickey
- name: AUTH_KEYCLOAK_SECRET
valueFrom:
secretKeyRef:
name: core
name: auth
key: keycloak.secret
- name: AUTH_POSTGRES_SSLMODE
valueFrom:
configMapKeyRef:
name: core
name: auth
key: postgres.sslmode
- name: AUTH_POSTGRES_CONNECTION_MAXIDLE
valueFrom:
configMapKeyRef:
name: core
name: auth
key: postgres.connection.maxidle
- name: AUTH_POSTGRES_CONNECTION_MAXOPEN
valueFrom:
configMapKeyRef:
name: core
name: auth
key: postgres.connection.maxopen
- name: AUTH_NOTAPPROVED_REDIRECT
valueFrom:
configMapKeyRef:
name: core
name: auth
key: notapproved_redirect
- name: AUTH_TENANT_SERVICEURL
valueFrom:
secretKeyRef:
name: core
name: auth
key: tenantsvc.url
- name: AUTH_CHESTARTERURL
valueFrom:
configMapKeyRef:
name: core
name: auth
key: chestarter.url
- name: AUTH_REDIRECT_VALID
valueFrom:
configMapKeyRef:
name: core
name: auth
key: redirect.valid
- name: AUTH_OPENSHIFT_TENANT_MASTERURL
valueFrom:
configMapKeyRef:
name: core
name: auth
key: openshift.tenant.masterurl
- name: AUTH_FEATURE_WORKITEM_REMOTE
valueFrom:
configMapKeyRef:
name: core
name: auth
key: feature.workitem.remote
imagePullPolicy: Always
name: core
name: auth
ports:
- containerPort: 8089
protocol: TCP
Expand Down Expand Up @@ -152,28 +152,28 @@ objects:
- kind: Service
apiVersion: v1
metadata:
name: core
name: auth
labels:
service: core
service: auth
spec:
ports:
- name: "8089"
protocol: TCP
port: 80
targetPort: 8089
selector:
service: core
service: auth
type: ClusterIP
sessionAffinity: null
- kind: Route
apiVersion: v1
metadata:
name: core
name: auth
spec:
host: ''
to:
kind: Service
name: core
name: auth
parameters:
- name: IMAGE_TAG
value: latest
6 changes: 3 additions & 3 deletions openshift/core.config.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
kind: Template
apiVersion: v1
metadata:
name: core
name: auth
objects:
- apiVersion: v1
kind: Secret
metadata:
name: core
name: auth
type: Opaque
data:
db.host: ZGI=
Expand All @@ -20,7 +20,7 @@ objects:
- apiVersion: v1
kind: ConfigMap
metadata:
name: core
name: auth
type: Opaque
data:
postgres.sslmode: require
Expand Down

0 comments on commit e75b187

Please sign in to comment.