Git Product home page Git Product logo

openunison / openunison-k8s-login-activedirectory Goto Github PK

View Code? Open in Web Editor NEW
42.0 7.0 13.0 2.16 MB

Login portal for Kubernetes using Active Directory. Provides authentication and SSO for kubectl and for the dashboard.

License: Apache License 2.0

Shell 0.48% Java 9.25% JavaScript 23.57% CSS 4.09% HTML 0.31% Python 0.30% Less 31.25% SCSS 30.74%
kubernetes dashboard kubernetes-dashboard activedirectory ldap kubernetes-rbac

openunison-k8s-login-activedirectory's Introduction

Orchestra Login Portal for ActiveDirectory

⚠️

Please go to https://openunison.github.io/ to integrate your cluster with OpenUnison. This repo is no longer supported and will no longer get updated builds

⚠️

Alt text

Short video of logging into Kubernetes and using kubectl using Active Directory

Orchestra Login Portal provides a login portal for Kubernetes that allows you to authenticate with your Active Directory credentials, use Active Directory groups for RBAC authorizations and provides integration for both kubectl and the Kubernetes Dashboard (https://github.com/kubernetes/dashboard). The portal runs inside of Kubernetes, leveraging Kubernetes for scalability, secret management and deployment.

Orchestra Login Portal Architecture

When a user accesses Kubernetes using Orchestra, they'll access both the login portal and the dashboard through OpenUnison (instead of directly via an ingress). OpenUnison will inject the user's identity into each request, allowing the dashboard to act on their behalf. The login portal has no external dependencies outside of Active Directory and Kubernetes. All objects for session state are stored as CRDs.

Deployment

Watch a Video

This 11 minute video shows the entire deployment and user onboarding process

Alt text

What You Need To Start

Prior to deploying Orchestra you will need:

  1. Kubernetes 1.10 or higher
  2. The Nginx Ingress Controller deployed (https://kubernetes.github.io/ingress-nginx/deploy/)
  3. The certificate authority certificate for your Active Directory forest
  4. Deploy the dashboard to your cluster
  5. helm 3.0+

The deployment is a four step process:

  1. Add Tremolo Security's Helm repo to your own
  2. Deploy the OpenUnison Operator
  3. Create a secret for your Active Directory password
  4. Deploy OpenUnison

Add Tremolo Security's Helm Repo

helm repo add tremolo https://nexus.tremolo.io/repository/helm/
helm repo update

Deploy The OpenUnison Operator

Create your namespace

kubectl create ns openunison

Deploy the operator

helm install openunison tremolo/openunison-operator --namespace openunison

Wait for the operator pod to be available

watch kubectl get pods -n openunison

Create A Secret For Your Active Directory Password

Create a secret in the openunison namespace:

apiVersion: v1
type: Opaque
metadata:
  name: orchestra-secrets-source
  namespace: openunison
data:
  AD_BIND_PASSWORD: aW0gYSBzZWNyZXQ=
  K8S_DB_SECRET: aW0gYSBzZWNyZXQ=
  unisonKeystorePassword: aW0gYSBzZWNyZXQ=
kind: Secret
Property Description
AD_BIND_PASSWORD The password for the ldap service account used to communicate with Active Directory/LDAP
unisonKeystorePassword The password for OpenUnison's keystore, should NOT contain an ampersand (&)
K8S_DB_SECRET A random string of characters used to secure the SSO process with the dashboard. This should be long and random, with no ampersands (&)

Deploy OpenUnison

Copy values.yaml (https://raw.githubusercontent.com/OpenUnison/helm-charts/master/openunison-k8s-login-activedirectory/values.yaml) and update as appropriate:

Property Description
network.openunison_host The host name for OpenUnison. This is what user's will put into their browser to login to Kubernetes
network.dashboard_host The host name for the dashboard. This is what users will put into the browser to access to the dashboard. NOTE: network.openunison_host and network.dashboard_host Both network.openunison_host and network.dashboard_host MUST point to OpenUnison
network.api_server_host The host name to use for the api server reverse proxy. This is what kubectl will interact with to access your cluster. NOTE: network.openunison_host and network.dashboard_host
network.k8s_url The URL for the Kubernetes API server
network.session_inactivity_timeout_seconds The number of seconds of inactivity before the session is terminated, also the length of the refresh token's session
network.createIngressCertificate If true (default), the operator will create a self signed Ingress certificate. Set to false if using an existing certificate or LetsEncrypt
network.force_redirect_to_tls If true, all traffic that reaches OpenUnison over http will be redirected to https. Defaults to true. Set to false when using an external TLS termination point, such as an istio sidecar proxy
network.ingress_type The type of Ingress object to create. nginx and istio is supported
network.ingress_annotations Annotations to add to the Ingress object
network.ingress_certificate The certificate that the Ingress object should reference
network.istio.selectors Labels that the istio Gateway object will be applied to. Default is istio: ingressgateway
active_directory.base The search base for Active Directory
active_directory.host The host name for a domain controller or VIP. If using SRV records to determine hosts, this should be the fully qualified domain name of the domain
active_directory.port The port to communicate with Active Directory
active_directory.bind_dn The full distinguished name (DN) of a read-only service account for working with Active Directory
active_directory.con_type ldaps for secure, ldap for plain text
active_directory.srv_dns If true, OpenUnison will lookup domain controllers by the domain's SRV DNS record
cert_template.ou The OU attribute for the forward facing certificate
cert_template.o The O attribute for the forward facing certificate
cert_template.l The L attribute for the forward facing certificate
cert_template.st The ST attribute for the forward facing certificate
cert_template.c The C attribute for the forward facing certificate
certs.use_k8s_cm Tells the deployment system if you should use k8s' built in certificate manager. If your distribution doesn't support this (such as Canonical and Rancher), set this to false
myvd_config_path The path to the MyVD configuration file, unless being customized, use WEB-INF/myvd.conf
dashboard.namespace The namespace for the dashboard. For the 1.x dashboard this is kube-system, for the 2.x dashboard this is kubernetes-dashboard
dashboard.cert_name The name of the secret in the dashboard's namespace that stores the certificate for the dashboard
dashboard.label The label of the dashboard pod, this is used to delete the pod once new certificates are generated
dashboard.service_name The name of the service object for the dashboard
k8s_cluster_name The name of the cluster to use in the ./kube-config. Defaults to kubernetes
image The name of the image to use
enable_impersonation If true, OpenUnison will run in impersonation mode. Instead of OpenUnison being integrated with Kubernetes via OIDC, OpenUnison will be a reverse proxy and impersonate users. This is useful with cloud deployments where oidc is not an option
monitoring.prometheus_service_account The prometheus service account to authorize access to the /monitoring endpoint
network_policies.enabled If true, creates a deny-all network policy and additional policies based on below configurations
network_policies.ingress.enabled if true, a policy will be created that allows access from the Namespace identified by the labels
network_policies.ingress.labels Labels for the Namespace hosting the Ingress
network_policies.monitoring.enabled if true, a policy will be created that allows access from the Namespace identified by the labels to support monitoring
network_policies.monitoring.labels Labels for the Namespace hosting monitoring
network_policies.apiserver.enabled if true, a policy will be created that allows access from the kube-ns Namespace identified by the labels
network_policies.apiserver.labels Labels for the Namespace hosting the api server
services.enable_tokenrequest If true, the OpenUnison Deployment will use the TokenRequest API instead of static ServiceAccount tokens. *** NOT AVAILABLE UNTIL OPENUNISON 1.0.21 ***
services.token_request_audience The audience expected by the API server *** NOT AVAILABLE UNTIL OPENUNISON 1.0.21 ***
services.token_request_expiration_seconds The number of seconds TokenRequest tokens should be valid for, minimum 600 seconds *** NOT AVAILABLE UNTIL OPENUNISON 1.0.21 ***
services.node_selectors annotations to use when choosing nodes to run OpenUnison, maps to the Deployment nodeSelector
services.pullSecret The name of the Secret that stores the pull secret for pulling the OpenUnison image
services.resources.requests.memory Memory requested by OpenUnison
services.resources.requests.cpu CPU requested by OpenUnison
services.resources.limits.memory Maximum memory allocated to OpenUnison
services.resources.limits.cpu Maximum CPU allocated to OpenUnison
openunison.replicas The number of OpenUnison replicas to run, defaults to 1
openunison.non_secret_data Add additional non-secret configuration options, added to the non_secret_data secrtion of the OpenUnison object
openunison.secrets Add additional keys from the orchestra-secrets-source Secret
impersonation.use_jetstack if true, the operator will deploy an instance of JetStack's OIDC Proxy (https://github.com/jetstack/kube-oidc-proxy). Default is false
impersonation.jetstack_oidc_proxy_image The name of the image to use
impersonation.explicit_certificate_trust If true, oidc-proxy will explicitly trust the tls.crt key of the Secret named in impersonation.ca_secret_name. Defaults to true
impersonation.ca_secret_name If impersonation.explicit_certificate_trust is true, the name of the tls Secret that stores the certificate for OpenUnison that the oidc proxy needs to trust. Defaults to ou-tls-secret
impersonation.resources.requests.memory Memory requested by oidc proxy
impersonation.resources.requests.cpu CPU requested by oidc proxy
impersonation.resources.limits.memory Maximum memory allocated to oidc proxy
impersonation.resources.limits.cpu Maximum CPU allocated to oidc proxy
myvd_configmap The name of a ConfigMap with a key called myvd.conf that will override the MyVD configuration

Additionally, add a base 64 encoded PEM certificate to your values under trusted_certs for pem_b64. This will allow OpenUnison to talk to Active Directory using TLS.

Finally, run the helm chart:

helm install orchestra tremolo/openunison-k8s-login-activedirectory --namespace openunison -f /path/to/values.yaml

Complete SSO Integration with Kubernetes

If using impersonation, you can skip this section. Run kubectl describe configmap api-server-config -n openunison to get the SSO integration artifacts. The output will give you both the API server flags that need to be configured on your API servers. The certificate that needs to be trusted is in the ou-tls-certificate secret in the openunison namespace.

First Login

To login, open your browser and go to the host you specified for network.openunison_host in your values.yaml. For instance if network.openunison_host is k8sou.tremolo.lan then navigate to https://k8sou.tremolo.lan. You'll be prompted for your Active Directory username and password. Once authenticated you'll be able login to the portal and generate your .kube/config from the Tokens screen.

CLI Login

You can bypass manually launching a browser with the oulogin kubectl plugin - https://github.com/TremoloSecurity/kubectl-login. This plugin will launch a browser for you, authenticate you then configure your kubectl configuration without any pre-configuration on your clients.

Enabling JetStack OIDC Proxy for Impersonation

OpenUnison's built in reverse proxy doesn't support the SPDY protocol which kubectl, and the client-go sdk, uses for exec, cp, and port-forward. If you require these options, and are using impersonation, you can now enable the JetStack OIDC proxy (https://github.com/jetstack/kube-oidc-proxy) instead of using OpenUnison's built in reverse proxy. To enable it, add the impersonation options from the helm chart configuration to your chart. NOTE when using the oidc-proxy services.enable_tokenrequest must be false. The Deployment created for the oidc proxy will inherrit the ServiceAccount from OpenUnison, as well as the services.pullSecret and services.node_selectors configuration in your helm chart. Resource requests and limits should be set specifically for the OIDC proxy under the impersonation section. The proxy is run as a non-privileged unix user as well. An example configuration when deploying with Let's Encrypt:

impersonation:
  use_jetstack: true
  jetstack_oidc_proxy_image: quay.io/jetstack/kube-oidc-proxy:v0.3.0
  explicit_certificate_trust: false

Authorizing Access via RBAC

On first login, if you haven't authorized access to any Kubernetes roles you won't be able to do anything. There are two approaches you can take:

Group Driven Membership

If you can populate groups in Active Directory for Kubernetes, you can use those groups for authorization via OpenUnison. OpenUnison will provide all of a user's groups via the id_token supplied to Kubernetes. The groups claim is a list of values, in this case the Distinguished Names of the user's groups. As an example, I created a group in AD called k8s_login_ckuster_admins in the Users container of my ent2k12.domain.com domain. This means the group will be CN=k8s_login_ckuster_admins,CN=Users,DC=ent2k12,DC=domain,DC=com (you can get the exact name of the group from the distinguishedName attribute of the group in Active Directory). To authorize members of this group to be cluster administrators, we create a ClusterRoleBinding:

kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
  name: activedirectory-cluster-admins
subjects:
- kind: Group
  name: CN=k8s_login_ckuster_admins,CN=Users,DC=ent2k12,DC=domain,DC=com
roleRef:
  kind: ClusterRole
  name: cluster-admin
  apiGroup: rbac.authorization.k8s.io

User Driven Membership

If you are not able to create groups in Active Directory, you can directly add users to role bindings. Kubernetes requires that you identify openid connect users with the prefix of the url of the identity provider. So if your OU_HOST is k8sou.tremolo.lan and your user's login is mmosley your username to Kubernetes would be https://k8sou.tremolo.lan/auth/idp/k8sIdp#mmosley. To create a cluster role binding to give cluster-admin access to a specific user:

kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
  name: activedirectory-cluster-admins
subjects:
- kind: User
  name: https://k8sou.tremolo.lan/auth/idp/k8sIdp#mmosley
roleRef:
  kind: ClusterRole
  name: cluster-admin
  apiGroup: rbac.authorization.k8s.io

NOTE: There are multiple reasons this is a bad idea:

  1. Hard to audit - There is no easy way to say "what role bindings is mmosley a member of?
  2. Difficult to remove access - Same reason as #1, you need to figure out every role binding a user is a member of to remove
  3. Easy to get wrong - If you mistype a user's login id Kubernetes won't tell you

If you can't use Active Directory groups, take a look at the OpenUnison Identity Manager for Kubernetes - https://github.com/TremoloSecurity/openunison-qs-kubernetes/tree/activedirectory. This tool adds on to the login capabilities with the ability to manage access to the cluster and namespaces, along with providing a self service way for users to request new namespaces and manage access.

Adding Applications and Clusters for Authentication

OpenUnison can support more applications for SSO then just Kubernetes and the dashboard. You can add other clusters and applications that support OpenID Connect by adding some custom resources to your openunison namespace.

Add a Trust

The Trust tells your OpenID Connect enabled application it can trust authentication requests from your OpenUnison. To start you'll need:

  1. Callback URL - This URL is where OpenUnison redirects the user after authenticating.
  2. Client Secret - Web applications, like GitLab, will need a secret that is shared between the two systems. Applications with CLI components, like ArgoCD, don't need a client secret.
  3. Client ID - This is how you identify your application to OpenUnison.

OpenUnison will provide the following claims for your application to consume:

Claim Description
sub Unique identifier as supplied from authentication
name Combination of first name and last name
preferred_username A username supplied from authentication
email The user's email address
groups The list of groups provided by the authentication source

Once you have everything you need to get started, create the Trust object.

Create a Secret

If you're application is using a client secret, a Secret needs to be created to hold it. This can either be a new Secret or it can be a new one. Which ever Secret you add it to, keep a note of the name of the Secret and the key in the data section used to store it.

If your application doesn't have a client secret, skip this step.

Create the Trust

Create a Trust object in the openunison namespace. Here's one for GitLab you can use as an example:

apiVersion: openunison.tremolo.io/v1
kind: Trust
metadata:
  name: gitlab
  namespace: openunison
spec:
  accessTokenSkewMillis: 120000
  accessTokenTimeToLive: 60000
  authChainName: LoginService
  clientId: gitlab
  clientSecret:
    keyName: gitlab
    secretName: orchestra-secrets-source
  codeLastMileKeyName: lastmile-oidc
  codeTokenSkewMilis: 60000
  publicEndpoint: false
  redirectURI:
  - https://gitlab.local.tremolo.dev/users/auth/openid_connect/callback
  signedUserInfo: false
  verifyRedirect: true

Here are the details for each option:

Option Desription
accessTokenSkewMillis Milliseconds milliseconds added to account for clock skew
accessTokenTimeToLive Time an access token should live in milliseconds
authChainName The authentication chain to use for login, do not change
clientId The client id shared by your application
clientSecret.scretName If using a client secret, the name of the Secret storing the client secret
clientSecret.keyName The key in the data section of the Secret storing the client secret
codeLastMileKeyName The name of the key used to encrypt the code token, do not change
codeTokenSkewMilis Milliseconds to add to code token lifetime to account for clock skew
publicEndpoint If true, a client secret is required. If false, no client secret is needed
redirectURI List of URLs that are authorized for callback. If a URL is provided by your application that isn't in this list SSO will fail
signedUserInfo if true, the userinfo endpoint will return a signed JSON Web Token. If false it will return plain JSON
verifyRedirect If true, the redirect URL provided by the client MUST be listed in the redirectURI section. Should ALLWAYS be true if not in a development environment

Once the Trust is added to the namespace, OpenUnison will pick it up automatically. You can test by trying to login to your application.

Add a "Badge" to Your Portal

When you login to the Orchestra portal, there are badges for your tokens and for the dashboard. You can dynamically add a badge for your application too. Here's an example PortalUrl object for ArgoCD:

apiVersion: openunison.tremolo.io/v1
kind: PortalUrl
metadata:
  name: argocs
  namespace: openunison
spec:
  label: ArgoCD
  org: B158BD40-0C1B-11E3-8FFD-0800200C9A66
  url: https://ArgoCD.apps.192-168-2-140.nip.io
  icon: iVBORw0KGgoAAAANSUhEUgAAANIAAADwCAYAAAB1/Tp/AAAfQ3pUWHRSYXcgcHJvZ...
  azRules:
  - constraint: o=Tremolo
    scope: dn
Option Descriptoin
label The label shown on badge in the portal
org If using orgnaizations to organize badges, the uuid of the org. If not using organizations, leave as is
url The URL the badge should send the user to
icon A base64 encoded icon with a width of 210 pixels and a height of 240 pixels
azRules Who is authorized to see this badge? See https://portal.apps.tremolo.io/docs/tremolosecurity-docs/1.0.19/openunison/openunison-manual.html#_applications_applications for an explination of the authorization rules

Once created, the badge will appear in the Orchestra portal! No need to restart the containers.

Organizing Badges

If you're adding multiple badges or clusters, you may find that the number of badges on your front page become difficult to manage. In that case you can enable orgnaizations in OpenUnison and organize your badges using an orgnaization tree.

Enable Organizations on your Portal Page

Edit the orchestra object in the openunison namespace (kubectl edit openunison orchestra -n openunison). Look for the non_secret_data section and add the following:

- name: SHOW_PORTAL_ORGS
  value: "true"

Once you save, OpenUnison will restart and when you login there will now be a tree that describes your organizations.

Orchestra with Organizations

Creating Organizations

Add an Org object to the openunison namespace. Here's an example Org:

apiVersion: openunison.tremolo.io/v1
kind: Org
metadata:
  name: cluster2
  namespace: openunison
spec:
  description: "My second cluster"
  uuid: 04901973-5f4c-46d9-9e22-55e88e168776
  parent: B158BD40-0C1B-11E3-8FFD-0800200C9A66
  showInPortal: true
  showInRequestAccess: false
  showInReports: false
  azRules:
  - scope: dn
    constraint: o=Tremolo
Option Description
description What appears in the blue box describing the organization
uuid A unique ID, recommend using Type 4 UUIDs
parent The unique id of the parent. B158BD40-0C1B-11E3-8FFD-0800200C9A66 is the root organization
showInPortal Should be true
showInRequestAccess N/A
showInReports N/A
azRules Who is authorized to see this badge? See https://portal.apps.tremolo.io/docs/tremolosecurity-docs/1.0.19/openunison/openunison-manual.html#_applications_applications for an explination of the authorization rules

Once added, the new organizations will be loaded dynamiclly by OpenUnison. Change the org in your PortalUrl object to match the uuid of the Org you want it to appear in.

Using Your Own Certificates

If you want to integrate your own certificates see our wiki entry - https://github.com/TremoloSecurity/OpenUnison/wiki/troubleshooting#how-do-i-change-openunisons-certificates

Monitoring OpenUnison

This deployment comes with a /metrics endpoint for monitoring. For details on how to integrate it into a Prometheus stack - https://github.com/TremoloSecurity/OpenUnison/wiki/troubleshooting#how-do-i-monitor-openunison-with-prometheus.

Trouble Shooting Help

Please take a look at https://github.com/TremoloSecurity/OpenUnison/wiki/troubleshooting if you're running into issues. If there isn't an entry there that takes care of your issue, please open an issue on this repo.

Whats next?

Now you can begin mapping OpenUnison's capabilities to your business and compliance needs. For instance you can add multi-factor authentication with TOTP or U2F, Create privileged workflows for onboarding, scheduled workflows that will deprovision users, etc.

Customizing Directory Connections

If you're running multiple directories, or need to connect to a generic LDAP directory isntead of Active Directory you can provide a custom MyVirtualDirectory configuration file without a re-build of your containers. Start with the myvd.conf file at https://github.com/OpenUnison/openunison-k8s-login-activedirectory/blob/master/src/main/webapp/WEB-INF/myvd.conf. ONLY edit the section that begins with server.activedirectory. As an example, the below configuration works against a generic LDAPv3 directory with the VirtualMemberOf insert configured to create a memeberOf attribute on users so we can supply groups to Kubernetes:

#Global AuthMechConfig
server.globalChain=accesslog

server.globalChain.accesslog.className=com.tremolosecurity.proxy.myvd.log.AccessLog

server.nameSpaces=rootdse,myvdroot,shadowUsers,activedirectory
server.rootdse.chain=dse
server.rootdse.nameSpace=
server.rootdse.weight=0
server.rootdse.dse.className=net.sourceforge.myvd.inserts.RootDSE
server.rootdse.dse.config.namingContexts=o=Tremolo
server.myvdroot.chain=root
server.myvdroot.nameSpace=o=Tremolo
server.myvdroot.weight=0
server.myvdroot.root.className=net.sourceforge.myvd.inserts.RootObject

server.shadowUsers.chain=debug,mapping,api
server.shadowUsers.nameSpace=ou=shadow,o=Tremolo
server.shadowUsers.weight=0
server.shadowUsers.enabled=true
server.shadowUsers.debug.className=net.sourceforge.myvd.inserts.DumpTransaction
server.shadowUsers.debug.config.logLevel=info
server.shadowUsers.debug.config.label=k8s
server.shadowUsers.mapping.className=net.sourceforge.myvd.inserts.mapping.AttributeMapper
server.shadowUsers.mapping.config.mapping=mail=email,givenName=first_name,sn=last_name
server.shadowUsers.api.className=com.tremolosecurity.myvd.K8sCrdInsert
server.shadowUsers.api.config.nameSpace=openunison
server.shadowUsers.api.config.k8sTargetName=k8s

server.activedirectory.chain=objectguid2text,dnmapper,memberof,objmap,membertrans,ldap
server.activedirectory.nameSpace=ou=activedirectory,o=Data
server.activedirectory.weight=0
server.activedirectory.enabled=true
server.activedirectory.objectguid2text.className=com.tremolosecurity.proxy.myvd.inserts.util.UUIDtoText
server.activedirectory.objectguid2text.config.attributeName=objectGUID
server.activedirectory.dnmapper.className=net.sourceforge.myvd.inserts.mapping.DNAttributeMapper
server.activedirectory.dnmapper.config.dnAttribs=member,owner,member,distinguishedName,manager
server.activedirectory.dnmapper.config.localBase=ou=activedirectory,o=Data
server.activedirectory.dnmapper.config.urlAttribs=
server.activedirectory.dnmapper.config.remoteBase=#[AD_BASE_DN]
server.activedirectory.memberof.className=net.sourceforge.myvd.inserts.mapping.VirtualMemberOf
server.activedirectory.memberof.config.searchBase=ou=activedirectory,o=Data
server.activedirectory.memberof.config.applyToObjectClass=inetOrgPerson
server.activedirectory.memberof.config.attributeName=memberOf
server.activedirectory.memberof.config.searchObjectClass=groupOfNames
server.activedirectory.memberof.config.searchAttribute=member
server.activedirectory.memberof.config.replace=false
server.activedirectory.objmap.className=net.sourceforge.myvd.inserts.mapping.AttributeValueMapper
server.activedirectory.objmap.config.mapping=objectClass.inetOrgPerson=inetOrgPerson,objectClass.groupofnames=groupOfNames
server.activedirectory.membertrans.className=net.sourceforge.myvd.inserts.mapping.AttributeMapper
server.activedirectory.membertrans.config.mapping=member=member,uid=uid
server.activedirectory.ldap.className=com.tremolosecurity.proxy.myvd.inserts.ad.ADLdapInsert
server.activedirectory.ldap.config.host=#[AD_HOST]
server.activedirectory.ldap.config.port=#[AD_PORT]
server.activedirectory.ldap.config.remoteBase=#[AD_BASE_DN]
server.activedirectory.ldap.config.proxyDN=#[AD_BIND_DN]
server.activedirectory.ldap.config.proxyPass=#[AD_BIND_PASSWORD]
server.activedirectory.ldap.config.useSrvDNS=#[SRV_DNS]
server.activedirectory.ldap.config.ignoreRefs=true
server.activedirectory.ldap.config.passBindOnly=true
server.activedirectory.ldap.config.maxIdle=90000
server.activedirectory.ldap.config.maxMillis=90000
server.activedirectory.ldap.config.maxStaleTimeMillis=90000
server.activedirectory.ldap.config.minimumConnections=10
server.activedirectory.ldap.config.maximumConnections=10
server.activedirectory.ldap.config.usePaging=false
server.activedirectory.ldap.config.pageSize=0
server.activedirectory.ldap.config.heartbeatIntervalMillis=60000
server.activedirectory.ldap.config.type=#[AD_CON_TYPE]
server.activedirectory.ldap.config.sslSocketFactory=com.tremolosecurity.proxy.ssl.TremoloSSLSocketFactory

Create a directory with your myvd.conf file in it and deploy it as a ConfigMap:

kubectl create configmap myvd --from-file . -n openunison

Finally, set myvd_configmap to the name of your ConfigMap in your values.yaml and update your helm deployment.

Updating Secrets and Certificates

To update any of the secrets in the source secret:

  1. Update the orchestra-secrets-source secret in the openunison namespace as appropriate
  2. Add an annotation (or edit an existing one) on the orchestra openunison object in the openunison namespace

This will trigger the operator to update your OpenUnison pods. To update certificates or non-secret data, just update it in the orchestra openunison object.

Customizing Orchestra

To customize Orchestra - https://github.com/TremoloSecurity/OpenUnison/wiki/troubleshooting#customizing-orchestra

Example Implementations

Amazon EKS - https://www.tremolosecurity.com/post/multi-tenant-amazon-eks-the-easy-way-part-i-authentication Multi-Cluster Portal - https://www.tremolosecurity.com/post/building-a-multi-cluster-authentication-portal

openunison-k8s-login-activedirectory's People

Contributors

mlbiam avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

openunison-k8s-login-activedirectory's Issues

AD_BIND_DN IllegalArgumentException:

I'm looking at the logs of my openunison-orchestra-* pod (under openunison namespace, and it seems that whenever OpenUnison attempt to send heartbeat to the AD, it keep throwing:

    Exception in thread "Thread-11" java.lang.IllegalArgumentException: <my AD_BIND_DN value>

    at com.novell.ldap.util.DN.<init>(DN.java:440)

    at net.sourceforge.myvd.inserts.ldap.LDAPConnectionPool.executeHeartBeat(LDAPConnectionPool.java:224)

    at net.sourceforge.myvd.inserts.ldap.LDAPHeartBeat.run(LDAPHeartBeat.java:43)

    at java.lang.Thread.run(Thread.java:748)`

Now this happens both if I set AD_BIND_DN value to simple AD username, and if I'm using full DN (which is of the fromat: CN=..,,OU=...,OU=,...OU=...,OU=...,OU=...,DC=...,DC=...,DC=...,DC=...)
Why does it happen? How can it be fixed?

auth defaultForm - null action

I try to configure authentication on bare metal Kubernetes using this guide.

I completed all steps in instruction, pods in openunison namespace are running, pod logs contain no errors. I can access login url (https://OU_HOST/auth/forms/defaultForm.jsp), but form action is null, so when i try to login i'm redirected to https://OU_HOST/auth/forms/null.

I searched openunison code, it seems the problem is with this file, TREMOLO_AUTH_URI is not set, but I couldn't find why.

Helm Chart?

Has anyone already created a helm chart for this? It seems like it would be useful.

Tommy

Unknown URI : /auth/idp/k8sId/.well-known/openid-configuration

Users can successfully log in to the portal but receive an Unauthorized message when accessing the dashboard and kubectl. The logs for the openunison pod show this error:

[2019-04-17 20:04:23,944][XNIO-1 task-1] ERROR ConfigSys - Could not process request
javax.servlet.ServletException: Unknown URI : /auth/idp/k8sId/.well-known/openid-configuration
	at com.tremolosecurity.proxy.auth.AuthMgrSys.doAuthMgr(AuthMgrSys.java:115) ~[unison-server-core-1.0.16.jar:?]
	at com.tremolosecurity.embedd.NextEmbSys.nextSys(NextEmbSys.java:126) ~[unison-server-core-1.0.16.jar:?]
	at com.tremolosecurity.proxy.auth.AzSys.doAz(AzSys.java:89) ~[unison-sdk-1.0.16.jar:?]
	at com.tremolosecurity.embedd.NextEmbSys.nextSys(NextEmbSys.java:111) ~[unison-server-core-1.0.16.jar:?]
	at com.tremolosecurity.proxy.auth.AuthSys.doAuth(AuthSys.java:118) ~[unison-server-core-1.0.16.jar:?]
	at com.tremolosecurity.embedd.NextEmbSys.nextSys(NextEmbSys.java:105) ~[unison-server-core-1.0.16.jar:?]
	at com.tremolosecurity.proxy.ConfigSys.doConfig(ConfigSys.java:266) [unison-server-core-1.0.16.jar:?]
	at com.tremolosecurity.embedd.NextEmbSys.nextSys(NextEmbSys.java:93) [unison-server-core-1.0.16.jar:?]
	at com.tremolosecurity.filter.UnisonServletFilter.doFilter(UnisonServletFilter.java:290) [unison-server-core-1.0.16.jar:?]
	at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61) [undertow-servlet-2.0.19.Final.jar:2.0.19.Final]
	at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131) [undertow-servlet-2.0.19.Final.jar:2.0.19.Final]
	at io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:84) [undertow-servlet-2.0.19.Final.jar:2.0.19.Final]
	at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62) [undertow-servlet-2.0.19.Final.jar:2.0.19.Final]
	at io.undertow.servlet.handlers.ServletChain$1.handleRequest(ServletChain.java:68) [undertow-servlet-2.0.19.Final.jar:2.0.19.Final]
	at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36) [undertow-servlet-2.0.19.Final.jar:2.0.19.Final]
	at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:132) [undertow-servlet-2.0.19.Final.jar:2.0.19.Final]
	at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57) [undertow-servlet-2.0.19.Final.jar:2.0.19.Final]
	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-2.0.19.Final.jar:2.0.19.Final]
	at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46) [undertow-core-2.0.19.Final.jar:2.0.19.Final]
	at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64) [undertow-servlet-2.0.19.Final.jar:2.0.19.Final]
	at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:48) [undertow-servlet-2.0.19.Final.jar:2.0.19.Final]
	at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43) [undertow-servlet-2.0.19.Final.jar:2.0.19.Final]
	at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:272) [undertow-servlet-2.0.19.Final.jar:2.0.19.Final]
	at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:81) [undertow-servlet-2.0.19.Final.jar:2.0.19.Final]
	at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:104) [undertow-servlet-2.0.19.Final.jar:2.0.19.Final]
	at io.undertow.server.Connectors.executeRootHandler(Connectors.java:364) [undertow-core-2.0.19.Final.jar:2.0.19.Final]
	at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:830) [undertow-core-2.0.19.Final.jar:2.0.19.Final]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_191]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_191]
	at java.lang.Thread.run(Thread.java:748) [?:1.8.0_191]

The OU_HOST and K8S_DASHBOARD_HOST are both configured in DNS to resolve to the IP of the ingress-nginx service.

openunison-orchestra Terminating

I have fresh instalation of k8s cluster 1.18 - 1 master 1 node (calico). Siple metalLB, ingress-nginx, kubernetes-dashboard. When I try install openunison using Helm with verified values.yaml etc. Operator creates all resources like svc, but openunison-orchestra is still ContainerCreating and Terminating. Pods are Terminated arfter few seconds.

openunison openunison-operator-7d58975678-wt6lm 1/1 Running 0 11m
openunison openunison-orchestra-66b547d6b6-m5lwf 0/1 Terminating 0 7s
openunison openunison-orchestra-7d688cd5bb-wkhz7 0/1 ContainerCreating 0 1s
openunison openunison-orchestra-8556b6c956-hc9gv 0/1 Running 0 4s
openunison openunison-orchestra-85b59f5bcd-sv766 0/1 Terminating 0 9s
openunison openunison-orchestra-94f745f66-vssnb 0/1 Terminating 0 10s

There isn't any error in the openunison-orchestra log.

Question about the OU_HOST value

Could you elaborate about this value? What exactly are the prerequisites that need to be done before?
Configuring it simply to k8sou.tremolo.lan does not work, as this host is unreachable.
Or is there anything that need to be done afterwards?

java.io.FileNotFoundException: /etc/extracerts/input.props

I've followed the installation guide, but when I apply artifact-deployment.yaml created job.batch/artifact-deployment finished with Error. In pod logs I found:

Exception in thread "main" java.io.FileNotFoundException: /etc/extracerts/input.props (No such file or directory)

But input.props is mounted to /etc/secrets dir in artifact-deployment.yaml.

Kubernetes dashboard authentication problem

Hi, we found some problem with using underscore user. We have applied server.shadowUsers.api.config.alwaysMapUIDInFilter=true from #34 that was working with kubectl authentication but error on accessing Kubernetes dashboard. Here's the error stack:

[2019-06-16 16:48:44,699][XNIO-1 task-4] INFO  AccessLog - SRCH op=52 con=51 base='sub=testx-95-xuser,ou=oidc,o=Tremolo' filter='(objectClass=*)' scope='0' attribs=''
[2019-06-16 16:48:44,699][XNIO-1 task-4] INFO  AccessLog - RESULT op=52 con=51 result=0 time=0
[2019-06-16 16:48:44,699][XNIO-1 task-4] INFO  AccessLog - SRCH-RESULT op=52 con=51 entries=0 time=0
[2019-06-16 16:48:44,699][XNIO-1 task-4] INFO  AccessLog - [Error] - k8s - https://k8s-dash.xxx.com/auth/oidc - uid=Anonymous,o=Tremolo - NONE [100.122.192.144] - [f36d986639ba7b9681520487cc9b090f08c141771]
[2019-06-16 16:48:44,699][XNIO-1 task-4] ERROR ConfigSys - Could not process request
java.lang.NullPointerException: null
	at net.sourceforge.myvd.chain.jdbcLdapImpl.EntrySetSearchResults.next(EntrySetSearchResults.java:53) ~[myvd-server-1.0.5.jar:?]
	at com.tremolosecurity.idp.providers.OpenIDConnectIdP.generateClaims(OpenIDConnectIdP.java:1227) ~[unison-idp-openidconnect-1.0.16.jar:?]
	at com.tremolosecurity.idp.providers.OpenIDConnectIdP.generateClaims(OpenIDConnectIdP.java:1162) ~[unison-idp-openidconnect-1.0.16.jar:?]
	at com.tremolosecurity.proxy.auth.util.OpenIDConnectToken.generateClaimsData(OpenIDConnectToken.java:101) ~[unison-applications-k8s-1.0.16.jar:?]
	at com.tremolosecurity.proxy.auth.util.OpenIDConnectToken.generateToken(OpenIDConnectToken.java:87) ~[unison-applications-k8s-1.0.16.jar:?]
	at com.tremolosecurity.proxy.auth.GenerateOIDCTokens.doGet(GenerateOIDCTokens.java:98) ~[unison-applications-k8s-1.0.16.jar:?]
	at com.tremolosecurity.proxy.auth.sys.AuthManagerImpl.execAuth(AuthManagerImpl.java:410) ~[unison-server-core-1.0.16.jar:?]
	at com.tremolosecurity.proxy.auth.sys.AuthManagerImpl.nextAuth(AuthManagerImpl.java:125) ~[unison-server-core-1.0.16.jar:?]
	at com.tremolosecurity.proxy.auth.sys.AuthManagerImpl.nextAuth(AuthManagerImpl.java:83) ~[unison-server-core-1.0.16.jar:?]
	at com.tremolosecurity.unison.proxy.auth.openidconnect.OpenIDConnectAuthMech.doGet(OpenIDConnectAuthMech.java:270) ~[unison-auth-openidconnect-1.0.16.jar:?]
	at com.tremolosecurity.proxy.auth.AuthMgrSys.doAuthMgr(AuthMgrSys.java:188) ~[unison-server-core-1.0.16.jar:?]
	at com.tremolosecurity.embedd.NextEmbSys.nextSys(NextEmbSys.java:126) ~[unison-server-core-1.0.16.jar:?]
	at com.tremolosecurity.proxy.auth.AzSys.doAz(AzSys.java:89) ~[unison-sdk-1.0.16.jar:?]
	at com.tremolosecurity.embedd.NextEmbSys.nextSys(NextEmbSys.java:111) ~[unison-server-core-1.0.16.jar:?]
	at com.tremolosecurity.proxy.auth.AuthSys.doAuth(AuthSys.java:118) ~[unison-server-core-1.0.16.jar:?]
	at com.tremolosecurity.embedd.NextEmbSys.nextSys(NextEmbSys.java:105) ~[unison-server-core-1.0.16.jar:?]
	at com.tremolosecurity.proxy.ConfigSys.doConfig(ConfigSys.java:293) [unison-server-core-1.0.16.jar:?]
	at com.tremolosecurity.embedd.NextEmbSys.nextSys(NextEmbSys.java:93) [unison-server-core-1.0.16.jar:?]
	at com.tremolosecurity.filter.UnisonServletFilter.doFilter(UnisonServletFilter.java:290) [unison-server-core-1.0.16.jar:?]
	at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61) [undertow-servlet-2.0.19.Final.jar:2.0.19.Final]
	at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131) [undertow-servlet-2.0.19.Final.jar:2.0.19.Final]
	at io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:84) [undertow-servlet-2.0.19.Final.jar:2.0.19.Final]
	at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62) [undertow-servlet-2.0.19.Final.jar:2.0.19.Final]
	at io.undertow.servlet.handlers.ServletChain$1.handleRequest(ServletChain.java:68) [undertow-servlet-2.0.19.Final.jar:2.0.19.Final]
	at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36) [undertow-servlet-2.0.19.Final.jar:2.0.19.Final]
	at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:132) [undertow-servlet-2.0.19.Final.jar:2.0.19.Final]
	at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57) [undertow-servlet-2.0.19.Final.jar:2.0.19.Final]
	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-2.0.19.Final.jar:2.0.19.Final]
	at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46) [undertow-core-2.0.19.Final.jar:2.0.19.Final]
	at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64) [undertow-servlet-2.0.19.Final.jar:2.0.19.Final]
	at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60) [undertow-core-2.0.19.Final.jar:2.0.19.Final]
	at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77) [undertow-servlet-2.0.19.Final.jar:2.0.19.Final]
	at io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43) [undertow-core-2.0.19.Final.jar:2.0.19.Final]
	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-2.0.19.Final.jar:2.0.19.Final]
	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-2.0.19.Final.jar:2.0.19.Final]
	at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:292) [undertow-servlet-2.0.19.Final.jar:2.0.19.Final]
	at io.undertow.servlet.handlers.ServletInitialHandler.access$100(ServletInitialHandler.java:81) [undertow-servlet-2.0.19.Final.jar:2.0.19.Final]
	at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:138) [undertow-servlet-2.0.19.Final.jar:2.0.19.Final]
	at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:135) [undertow-servlet-2.0.19.Final.jar:2.0.19.Final]
	at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:48) [undertow-servlet-2.0.19.Final.jar:2.0.19.Final]
	at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43) [undertow-servlet-2.0.19.Final.jar:2.0.19.Final]
	at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:272) [undertow-servlet-2.0.19.Final.jar:2.0.19.Final]
	at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:81) [undertow-servlet-2.0.19.Final.jar:2.0.19.Final]
	at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:104) [undertow-servlet-2.0.19.Final.jar:2.0.19.Final]
	at io.undertow.server.Connectors.executeRootHandler(Connectors.java:364) [undertow-core-2.0.19.Final.jar:2.0.19.Final]
	at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:830) [undertow-core-2.0.19.Final.jar:2.0.19.Final]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_212]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_212]
	at java.lang.Thread.run(Thread.java:748) [?:1.8.0_212]

Show Icons to only who has access to cluster in multi cluster authentication

I've implemented multi cluster authentication portal leveraging login active directory as the management cluster and login-oidc as satellite clusters , I want to only show the icons for satellite cluster to a user if he has access to those clusters. Is there any way that i could acheive this.
I have this in the org and portalUrl
azRules:

  • constraint: o=Tremolo
    scope: dn

Typo

Dashbard => Dashboard

screen shot 2018-10-30 at 4 33 49 pm

Add custom certificate to --auth-provider-arg=idp-certificate-authority-data

Hi

When we use our own certificates or ca on the ingress the commands shown on the unison portal to use kubectl keep showing the created by openunison application instead the ours, even if we put it on the extracerts configmap.

Due to this the kubectl command shows tls error.

Unable to connect to the server: Get https://.....auth/idp/k8sIdp/.well-known/openid-configuration: x509: certificate signed by unknown authority

The command should show on --auth-provider-arg=idp-certificate-authority-data= a value took from the configmap or add to the keystore on a specific entry the value took from the extracerts.

Thanks
Roberto

Re-created kubernetes api cert, openunison shows "unauthorized"

Had to update the kubernetes api cert to add in the hostname/ip of the server that the openunison deploys in the kube config and upon updating the cert openunison doesn't auth correctly. I have deleted both orchestrator and operator (they auto-redeployed) and i also re-ran the "check-cert" cron job but neither thing has helped. Do i need to redeploy the entire openunison stack?

Thanks!

kubectl config needs updating on every login

Login portal is working to authenticate users and populate group information. Proxy access to the dashboard works correctly and kubectl commands succeed once kubectl is configured per the web UI instructions.

When a session times out and the user authenticates again, the kubectl configuration must be replaced in order for commands to succeed. If the previous kubectl config is used, commands fail with a 401 status code.

Is this rewrite of the kubectl configuration each time a user logs in expected or do we perhaps have something misconfigured?

# Begin logged in with a correct kubectl config
$ date ; $ kubectl get services
Thu Apr 18 13:01:02 CDT 2019
NAME         TYPE        CLUSTER-IP   EXTERNAL-IP   PORT(S)   AGE
kubernetes   ClusterIP   10.96.0.1    <none>        443/TCP   20h

# Wait for token to expire:
$ date ; kubectl get services
Thu Apr 18 13:06:21 CDT 2019
Unable to connect to the server: failed to refresh token: oauth2: cannot fetch token: 401 Unauthorized
Response: 

# Log in through Web UI and try kubectl again
$ date ; kubectl get services
Thu Apr 18 13:06:33 CDT 2019
Unable to connect to the server: failed to refresh token: oauth2: cannot fetch token: 401 Unauthorized
Response:

# Copy and paste kubectl configuration command from web UI
$ kubectl get services
NAME         TYPE        CLUSTER-IP   EXTERNAL-IP   PORT(S)   AGE
kubernetes   ClusterIP   10.96.0.1    <none>        443/TCP   20h

# Diff the old and new kubectl configurations. The refresh-token and id-token are different.

Installing offline

I am trying to install the helm chat in a k8s cluster which has no internet connectivity. I have download the images manually and loaded on the servers and trying to run the charts locally but I am not able to get it installed completely. Operator installation is successful and the pods is running but stuck with the openunison-k8s-login-activedirectory installation. I am pretty new to k8s, so any help would be highly appreciated.

Error while trying to build locally

I have cloned the repo to my local machine in order to customize it , when I try to build it using mvn clean package, it fails to download some dependencies, and gives the following error.

[ERROR] Failed to execute goal on project openunison-k8s-login-activedirectory: Could not resolve dependencies for project io.openunison:openunison-k8s-login-activedirectory:war:1.0.18: The following artifacts could not be resolved: com.
tremolosecurity.unison:openunison-on-undertow:jar:1.0.18, com.tremolosecurity.unison:unison-service-undertow:jar:1.0.18, com.tremolosecurity.unison:unison-sdk:jar:1.0.18, net.sourceforge.myvd:myvd-server:jar:1.0.7, com.tremolosecurity.my
vd:jldap:jar:1.0.0, com.tremolosecurity.myvd:jdbcLdap:jar:1.0.0, com.tremolosecurity.myvd:apacheds-service:jar:2.0.0-M20, com.tremolosecurity.unison:unison-lastmile-sdk:jar:1.0.18, com.tremolosecurity.unison:unison-provisioning-sdk:jar:1
.0.18, com.tremolosecurity.unison:openunison-util-classes:jar:1.0.18, com.tremolosecurity.unison:unison-server-core:jar:1.0.18, com.tremolosecurity.unison:open-unison-classes:jar:1.0.18, com.tremolosecurity.unison:open-unison-webapp:war:
1.0.18, com.tremolosecurity.unison:unison-applications-sugarcrm-6.x:jar:1.0.18, com.tremolosecurity.unison:unison-scalejs-main:jar:1.0.18, com.tremolosecurity.unison:unison-scalejs-common:jar:1.0.18, com.tremolosecurity.unison:unison-sdk
-types:jar:1.0.18: Could not transfer artifact com.tremolosecurity.unison:openunison-on-undertow:jar:1.0.18 from/to Tremolo Security Dependencies (https://nexus.tremolo.io/repository/dependencies/): Transfer failed for https://nexus.trem
olo.io/repository/dependencies/com/tremolosecurity/unison/openunison-on-undertow/1.0.18/openunison-on-undertow-1.0.18.jar: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBu
ilderException: unable to find valid certification path to requested target -> [Help 1]

I have downloaded the cert and added that to keystore and passing thekeystore as an argument to maven like mvn clean package "-Djavax.net.ssl.trustStore=mavenkeystore"

Login error loading config. When the ad or ldap user has not mail set.

Hi Marc

I have seen that when a user does not mail set on AD (or ldap) the software throws error loading config and breaks.

I tried to create my own email and mail attrs at shadowUsers chain and are used by the software (I see in the ui the dummy mail) but when the origin ldap does not have it set, it gives error too, this is the myvd adding dummy mail.

    #Global AuthMechConfig
    server.globalChain=accesslog
    server.globalChain.accesslog.className=com.tremolosecurity.proxy.myvd.log.AccessLog
    server.nameSpaces=rootdse,myvdroot,shadowUsers,activedirectory
    server.rootdse.chain=dse
    server.rootdse.nameSpace=
    server.rootdse.weight=0
    server.rootdse.dse.className=net.sourceforge.myvd.inserts.RootDSE
    server.rootdse.dse.config.namingContexts=o=Tremolo
    server.myvdroot.chain=root
    server.myvdroot.nameSpace=o=Tremolo
    server.myvdroot.weight=0
    server.myvdroot.root.className=net.sourceforge.myvd.inserts.RootObject
    server.shadowUsers.chain=debug,mapping,addmail,addemail,api
    server.shadowUsers.nameSpace=ou=shadow,o=Tremolo
    server.shadowUsers.weight=0
    server.shadowUsers.enabled=true
    server.shadowUsers.debug.className=net.sourceforge.myvd.inserts.DumpTransaction
    server.shadowUsers.debug.config.logLevel=info
    server.shadowUsers.debug.config.label=k8s
    server.shadowUsers.mapping.className=net.sourceforge.myvd.inserts.mapping.AttributeMapper
    server.shadowUsers.mapping.config.mapping=givenName=first_name,sn=last_name
    server.shadowUsers.addmail.className=net.sourceforge.myvd.inserts.mapping.AddAttribute
    server.shadowUsers.addmail.config.attributeName=mail
    [email protected]
    server.shadowUsers.addmail.config.objectClass=inetOrgPerson
    server.shadowUsers.addemail.className=net.sourceforge.myvd.inserts.mapping.AddAttribute
    server.shadowUsers.addemail.config.attributeName=email
    server.shadowUsers.addemail.config.attributeValue=email@email.email
    server.shadowUsers.addemail.config.objectClass=inetOrgPerson
    server.shadowUsers.api.className=com.tremolosecurity.myvd.K8sCrdInsert
    server.shadowUsers.api.config.nameSpace=openunison
    server.shadowUsers.api.config.k8sTargetName=k8s
    server.shadowUsers.api.config.alwaysMapUIDInFilter=true
    server.activedirectory.chain=objectguid2text,dnmapper,memberof,objmap,membertrans,ldap
    server.activedirectory.nameSpace=ou=activedirectory,o=Data
    server.activedirectory.weight=0
    server.activedirectory.enabled=true
    server.activedirectory.objectguid2text.className=com.tremolosecurity.proxy.myvd.inserts.util.UUIDtoText
    server.activedirectory.objectguid2text.config.attributeName=objectGUID
    server.activedirectory.dnmapper.className=net.sourceforge.myvd.inserts.mapping.DNAttributeMapper
    server.activedirectory.dnmapper.config.dnAttribs=member,owner,member,distinguishedName,manager
    server.activedirectory.dnmapper.config.localBase=ou=activedirectory,o=Data
    server.activedirectory.dnmapper.config.urlAttribs=
    server.activedirectory.dnmapper.config.remoteBase=#[AD_BASE_DN]
    server.activedirectory.memberof.className=net.sourceforge.myvd.inserts.mapping.VirtualMemberOf
    server.activedirectory.memberof.config.searchBase=ou=activedirectory,o=Data
    server.activedirectory.memberof.config.applyToObjectClass=inetOrgPerson
    server.activedirectory.memberof.config.attributeName=memberOf
    server.activedirectory.memberof.config.searchObjectClass=groupOfNames
    server.activedirectory.memberof.config.searchAttribute=member
    server.activedirectory.memberof.config.replace=false
    server.activedirectory.objmap.className=net.sourceforge.myvd.inserts.mapping.AttributeValueMapper
    server.activedirectory.objmap.config.mapping=objectClass.inetOrgPerson=inetOrgPerson,objectClass.groupofnames=groupOfNames
    server.activedirectory.membertrans.className=net.sourceforge.myvd.inserts.mapping.AttributeMapper
    server.activedirectory.membertrans.config.mapping=member=member,uid=uid
    server.activedirectory.ldap.className=com.tremolosecurity.proxy.myvd.inserts.ad.ADLdapInsert
    server.activedirectory.ldap.config.host=#[AD_HOST]
    server.activedirectory.ldap.config.port=#[AD_PORT]
    server.activedirectory.ldap.config.remoteBase=#[AD_BASE_DN]
    server.activedirectory.ldap.config.proxyDN=#[AD_BIND_DN]
    server.activedirectory.ldap.config.proxyPass=#[AD_BIND_PASSWORD]
    server.activedirectory.ldap.config.useSrvDNS=#[SRV_DNS]
    server.activedirectory.ldap.config.ignoreRefs=true
    server.activedirectory.ldap.config.passBindOnly=true
    server.activedirectory.ldap.config.maxIdle=90000
    server.activedirectory.ldap.config.maxMillis=90000
    server.activedirectory.ldap.config.maxStaleTimeMillis=90000
    server.activedirectory.ldap.config.minimumConnections=10
    server.activedirectory.ldap.config.maximumConnections=10
    server.activedirectory.ldap.config.usePaging=false
    server.activedirectory.ldap.config.pageSize=0
    server.activedirectory.ldap.config.heartbeatIntervalMillis=60000
    server.activedirectory.ldap.config.type=#[AD_CON_TYPE]
    server.activedirectory.ldap.config.sslSocketFactory=com.tremolosecurity.proxy.ssl.TremoloSSLSocketFactory

But the problem should be in other place that uses the original mail from ldap.

Thanks
Roberto.

myvd.conf results in no identity providers

[2018-11-13 13:36:00,001][local_Worker-2] INFO JobRunShell - Job admin.clearSessions threw a JobExecutionException:
org.quartz.JobExecutionException: com.tremolosecurity.provisioning.core.ProvisioningException: No identity providers
at com.tremolosecurity.provisioning.scheduler.UnisonJob.execute(UnisonJob.java:59) ~[unison-sdk-1.0.16.jar:?]
at org.quartz.core.JobRunShell.run(JobRunShell.java:202) [quartz-2.3.0.jar:?]
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573) [quartz-2.3.0.jar:?]
Caused by: com.tremolosecurity.provisioning.core.ProvisioningException: No identity providers
at com.tremolosecurity.idp.providers.oidc.model.jobs.ClearSessions.execute(ClearSessions.java:35) ~[unison-idp-openidconnect-1.0.16.jar:?]
at com.tremolosecurity.provisioning.scheduler.UnisonJob.execute(UnisonJob.java:57) ~[unison-sdk-1.0.16.jar:?]
... 2 more
[2018-11-13 13:36:52,568][Thread-19] WARN SessionManagerImpl - Clearing 0 sessions
[2018-11-13 13:37:00,001][local_Worker-3] INFO JobRunShell - Job admin.clearSessions threw a JobExecutionException:
org.quartz.JobExecutionException: com.tremolosecurity.provisioning.core.ProvisioningException: No identity providers
at com.tremolosecurity.provisioning.scheduler.UnisonJob.execute(UnisonJob.java:59) ~[unison-sdk-1.0.16.jar:?]
at org.quartz.core.JobRunShell.run(JobRunShell.java:202) [quartz-2.3.0.jar:?]
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573) [quartz-2.3.0.jar:?]
Caused by: com.tremolosecurity.provisioning.core.ProvisioningException: No identity providers

Followed the instruction as per the documentation, I am using openldap for the authentication. Testing the configuration at the moment. Even used admin to get the connection established. But didnt work

Openldap is hosted inside the same K8s cluster. Receiving handshake from LB to the openldap. Hence TLS may not be an issue.

However, openunison is reporting it as no identity provider

Can't access main auth page after deployment

Hello again!

As mentioned in ticket #60 i am unable to get access to the main page after deployment.

After looking at the details of the openunison operator i can see that both the port and the host port are "none" after deployment. In the video is see that at the 2:43 min marker that it should be running on port 8443. is that correct? If i wget the cluster ip for the pod at the normal https endpoint on my k8s node i don't receive anything back.

Here are some further details about the container (should be defaults):

`

  • java
  • -jar
  • /usr/local/openunison/javascript-operator.jar
  • -tokenPath
  • /var/run/secrets/kubernetes.io/serviceaccount/token
  • -rootCaPath
  • /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
  • -kubernetesURL
  • https://kubernetes.default.svc.cluster.local
  • -namespace
  • NAMESPACE
  • -apiGroup
  • openunison.tremolo.io/v1
  • -objectType
  • openunisons
  • -jsPath
  • /usr/local/openunison/js
  • -configMaps
  • /etc/extraMaps
    `

Not sure what other information to provide at this point. Thanks!

^M Character in the configmap api-server-config for certs

Hi,

When using kubectl get cm api-server-config -n openunison -o jsonpath='{.data.ou-ca.pem64-encoded}' and store it in a file for openunsion deployment automation, the file adds ^M to all the new lines. Found \r\n in the configmap data. Please verify if this is correct

Ram

Nginx Ingress Controller - "Service 'openunison/openunison-orchestra' does not have any active Endpoint."

I've installed ingress-nginx for bare metal - https://kubernetes.github.io/ingress-nginx/deploy/. The installation was successful.
Then, I installed the OpenUnison portal, which was successful as well. When looking at the logs of the orchestra pod, there are now errors as well.
However, when looking at the ingress controller pod logs I can see the following:
"Service 'openunison/openunison-orchestra' does not have any active Endpoint."
And the OpenUnison host is unreachable.
How can I fix this?

Own TLS Certificate ans SSO

I have replaced a self-signed certificate for OpenUnison and the Kubernetes Dashboard:
kubectl -n openunison edit secrets ou-tls-certificate

This works. I see trusted certificates at OpenUnison portal.

Now I want to set up SSO Integration with Kubernetes. I copy my certificate chain to /etc/kubernetes/pki/ou-ca.pem and setup --oidc-ca-file etc.

Opening dashboard end with an error.
INFO AccessLog - [Error] - k8s - https://dashboard.company.local/auth/oidc - uid=...
ERROR ConfigSys - Could not process request
javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

I'm not sure what format ou-ca.pem is expected in the case of the certificate chain.

btw - SSO Integration works with original self-signed certificate

First login problem with NullPointerException: null

Hi, i just deployed OpenUnison on Kops cluster. After the first login, it shown "Login Choice Reset" page. Then for 2nd login, it shown error page with the pod throwing this error.

[2019-06-11 11:02:44,083][XNIO-1 task-4] INFO  AccessLog - SRCH op=2 con=1 base='o=Data' filter='(uid=usera)' scope='2' attribs=''
[2019-06-11 11:02:44,120][XNIO-1 task-4] INFO  AccessLog - RESULT op=2 con=1 result=0 time=38
[2019-06-11 11:02:44,149][XNIO-1 task-4] INFO  AccessLog - BIND op=3 con=2 dn='CN=User A,OU=Devops,OU=Development,OU=Peoples,ou=activedirectory,o=Data'
[2019-06-11 11:02:44,180][XNIO-1 task-4] INFO  AccessLog - RESULT op=3 con=2 result=0 time=31
[2019-06-11 11:02:44,451][XNIO-1 task-4] INFO  AccessLog - [Error] - scale - https://k8s.xxx.com/auth/formLogin - uid=Anonymous,o=Tremolo - NONE [100.119.160.0] - [fa8272940ba3ea2c4dd55a92f059bd53ceee81be3]
[2019-06-11 11:02:44,451][XNIO-1 task-4] ERROR ConfigSys - Could not process request
java.lang.NullPointerException: null
	at com.tremolosecurity.provisioning.providers.K8sCrdUserProvider.createUser(K8sCrdUserProvider.java:95) ~[unison-applications-k8s-1.0.16.jar:?]
	at com.tremolosecurity.provisioning.providers.K8sCrdUserProvider.syncUser(K8sCrdUserProvider.java:191) ~[unison-applications-k8s-1.0.16.jar:?]
	at com.tremolosecurity.provisioning.core.ProvisioningTargetImpl.syncUser(ProvisioningTargetImpl.java:107) ~[unison-server-core-1.0.16.jar:?]
	at com.tremolosecurity.provisioning.tasks.Provision.doTask(Provision.java:112) ~[unison-server-core-1.0.16.jar:?]
	at com.tremolosecurity.provisioning.core.WorkflowTaskImpl.runSubTasks(WorkflowTaskImpl.java:165) ~[unison-server-core-1.0.16.jar:?]
	at com.tremolosecurity.provisioning.tasks.Mapping.doTask(Mapping.java:67) ~[unison-server-core-1.0.16.jar:?]
	at com.tremolosecurity.provisioning.core.WorkflowImpl.executeWorkflow(WorkflowImpl.java:254) ~[unison-server-core-1.0.16.jar:?]
	at com.tremolosecurity.provisioning.core.WorkflowImpl.executeWorkflow(WorkflowImpl.java:148) ~[unison-server-core-1.0.16.jar:?]
	at com.tremolosecurity.provisioning.core.WorkflowImpl.executeWorkflow(WorkflowImpl.java:541) ~[unison-server-core-1.0.16.jar:?]
	at com.tremolosecurity.provisioning.auth.JITAuthMech.doGet(JITAuthMech.java:126) ~[unison-server-core-1.0.16.jar:?]
	at com.tremolosecurity.provisioning.auth.JITAuthMech.doPost(JITAuthMech.java:75) ~[unison-server-core-1.0.16.jar:?]
	at com.tremolosecurity.proxy.auth.sys.AuthManagerImpl.execAuth(AuthManagerImpl.java:412) ~[unison-server-core-1.0.16.jar:?]
	at com.tremolosecurity.proxy.auth.sys.AuthManagerImpl.nextAuth(AuthManagerImpl.java:125) ~[unison-server-core-1.0.16.jar:?]
	at com.tremolosecurity.proxy.auth.sys.AuthManagerImpl.nextAuth(AuthManagerImpl.java:83) ~[unison-server-core-1.0.16.jar:?]
	at com.tremolosecurity.proxy.auth.FormLoginAuthMech.doPost(FormLoginAuthMech.java:217) ~[unison-server-core-1.0.16.jar:?]
	at com.tremolosecurity.proxy.auth.AuthMgrSys.doAuthMgr(AuthMgrSys.java:190) ~[unison-server-core-1.0.16.jar:?]
	at com.tremolosecurity.embedd.NextEmbSys.nextSys(NextEmbSys.java:126) ~[unison-server-core-1.0.16.jar:?]
	at com.tremolosecurity.proxy.auth.AzSys.doAz(AzSys.java:89) ~[unison-sdk-1.0.16.jar:?]
	at com.tremolosecurity.embedd.NextEmbSys.nextSys(NextEmbSys.java:111) ~[unison-server-core-1.0.16.jar:?]
	at com.tremolosecurity.proxy.auth.AuthSys.doAuth(AuthSys.java:118) ~[unison-server-core-1.0.16.jar:?]
	at com.tremolosecurity.embedd.NextEmbSys.nextSys(NextEmbSys.java:105) ~[unison-server-core-1.0.16.jar:?]
	at com.tremolosecurity.proxy.ConfigSys.doConfig(ConfigSys.java:293) [unison-server-core-1.0.16.jar:?]
	at com.tremolosecurity.embedd.NextEmbSys.nextSys(NextEmbSys.java:93) [unison-server-core-1.0.16.jar:?]
	at com.tremolosecurity.filter.UnisonServletFilter.doFilter(UnisonServletFilter.java:290) [unison-server-core-1.0.16.jar:?]
	at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61) [undertow-servlet-2.0.19.Final.jar:2.0.19.Final]
	at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131) [undertow-servlet-2.0.19.Final.jar:2.0.19.Final]
	at io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:84) [undertow-servlet-2.0.19.Final.jar:2.0.19.Final]
	at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62) [undertow-servlet-2.0.19.Final.jar:2.0.19.Final]
	at io.undertow.servlet.handlers.ServletChain$1.handleRequest(ServletChain.java:68) [undertow-servlet-2.0.19.Final.jar:2.0.19.Final]
	at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36) [undertow-servlet-2.0.19.Final.jar:2.0.19.Final]
	at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:132) [undertow-servlet-2.0.19.Final.jar:2.0.19.Final]
	at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57) [undertow-servlet-2.0.19.Final.jar:2.0.19.Final]
	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-2.0.19.Final.jar:2.0.19.Final]
	at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46) [undertow-core-2.0.19.Final.jar:2.0.19.Final]
	at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64) [undertow-servlet-2.0.19.Final.jar:2.0.19.Final]
	at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60) [undertow-core-2.0.19.Final.jar:2.0.19.Final]
	at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77) [undertow-servlet-2.0.19.Final.jar:2.0.19.Final]
	at io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43) [undertow-core-2.0.19.Final.jar:2.0.19.Final]
	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-2.0.19.Final.jar:2.0.19.Final]
	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-2.0.19.Final.jar:2.0.19.Final]
	at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:292) [undertow-servlet-2.0.19.Final.jar:2.0.19.Final]
	at io.undertow.servlet.handlers.ServletInitialHandler.access$100(ServletInitialHandler.java:81) [undertow-servlet-2.0.19.Final.jar:2.0.19.Final]
	at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:138) [undertow-servlet-2.0.19.Final.jar:2.0.19.Final]
	at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:135) [undertow-servlet-2.0.19.Final.jar:2.0.19.Final]
	at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:48) [undertow-servlet-2.0.19.Final.jar:2.0.19.Final]
	at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43) [undertow-servlet-2.0.19.Final.jar:2.0.19.Final]
	at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:272) [undertow-servlet-2.0.19.Final.jar:2.0.19.Final]
	at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:81) [undertow-servlet-2.0.19.Final.jar:2.0.19.Final]
	at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:104) [undertow-servlet-2.0.19.Final.jar:2.0.19.Final]
	at io.undertow.server.Connectors.executeRootHandler(Connectors.java:364) [undertow-core-2.0.19.Final.jar:2.0.19.Final]
	at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:830) [undertow-core-2.0.19.Final.jar:2.0.19.Final]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_212]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_212]
	at java.lang.Thread.run(Thread.java:748) [?:1.8.0_212]

The error is very vague. Hoping anyone here can guide me on how to debug it. thanks!

Upgrade from 1.0.18

Hi @mlbiam , I have setup openunison version 1.0.18 andeverything workedperfectly,I was able to customize the logos and other stuff as well. Now in the codebase i don't see the jsp's like the defaultForm.jsp etc. and if i try to use my custom built image with the latestversion of operator and this chart then orchestra pod fails with the below error.

java.security.KeyStoreException: Cannot overwrite own certificate
        at sun.security.pkcs12.PKCS12KeyStore.setCertEntry(PKCS12KeyStore.java:978)
        at sun.security.pkcs12.PKCS12KeyStore.engineSetCertificateEntry(PKCS12KeyStore.java:967)
        at java.security.KeyStore.setCertificateEntry(KeyStore.java:1201)
        at com.tremolosecurity.openunison.OpenUnisonConfigManager.loadKeystore(OpenUnisonConfigManager.java:296)
        at com.tremolosecurity.config.util.UnisonConfigManagerImpl.initialize(UnisonConfigManagerImpl.java:366)
        at com.tremolosecurity.filter.UnisonServletFilter.init(UnisonServletFilter.java:351)
        at com.tremolosecurity.openunison.OpenUnisonServletFilter.init(OpenUnisonServletFilter.java:118)
        at io.undertow.servlet.core.LifecyleInterceptorInvocation.proceed(LifecyleInterceptorInvocation.java:111)
        at io.undertow.servlet.core.ManagedFilter.createFilter(ManagedFilter.java:80)
        at io.undertow.servlet.core.DeploymentManagerImpl$2.call(DeploymentManagerImpl.java:591)
        at io.undertow.servlet.core.DeploymentManagerImpl$2.call(DeploymentManagerImpl.java:556)
        at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:42)
        at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)
        at io.undertow.servlet.core.DeploymentManagerImpl.start(DeploymentManagerImpl.java:598)
        at com.tremolosecurity.openunison.undertow.OpenUnisonOnUndertow.main(OpenUnisonOnUndertow.java:329)
Exception in thread "main" javax.servlet.ServletException: java.security.KeyStoreException: Cannot overwrite own certificate
        at com.tremolosecurity.filter.UnisonServletFilter.init(UnisonServletFilter.java:382)
        at com.tremolosecurity.openunison.OpenUnisonServletFilter.init(OpenUnisonServletFilter.java:118)
        at io.undertow.servlet.core.LifecyleInterceptorInvocation.proceed(LifecyleInterceptorInvocation.java:111)
        at io.undertow.servlet.core.ManagedFilter.createFilter(ManagedFilter.java:80)
        at io.undertow.servlet.core.DeploymentManagerImpl$2.call(DeploymentManagerImpl.java:591)
        at io.undertow.servlet.core.DeploymentManagerImpl$2.call(DeploymentManagerImpl.java:556)
        at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:42)
        at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)
        at io.undertow.servlet.core.DeploymentManagerImpl.start(DeploymentManagerImpl.java:598)
        at com.tremolosecurity.openunison.undertow.OpenUnisonOnUndertow.main(OpenUnisonOnUndertow.java:329)
Caused by: java.security.KeyStoreException: Cannot overwrite own certificate
        at sun.security.pkcs12.PKCS12KeyStore.setCertEntry(PKCS12KeyStore.java:978)
        at sun.security.pkcs12.PKCS12KeyStore.engineSetCertificateEntry(PKCS12KeyStore.java:967)
        at java.security.KeyStore.setCertificateEntry(KeyStore.java:1201)
        at com.tremolosecurity.openunison.OpenUnisonConfigManager.loadKeystore(OpenUnisonConfigManager.java:296)
        at com.tremolosecurity.config.util.UnisonConfigManagerImpl.initialize(UnisonConfigManagerImpl.java:366)
        at com.tremolosecurity.filter.UnisonServletFilter.init(UnisonServletFilter.java:351)
        ... 9 more

I dont see any jsp under webapp/auth/forms except cli-login-finished.jsp in the latest version. Appreciate your help

kubectl Windows Command doesn't work

I have some windows users and kubectl Windows Command from "Kubernetes Tokens" page doesn't work. There is a missing part with certificate-authority-data. Is it possible to edit the template? I have a working solution. You have to run it in PowerShell. I had to add some commands at the beginning, replace kubectl config set-cluster command and at the end delete the folder with ca. Use rn for a new line.

md c:\k8sca -Force ; "-----BEGIN CERTIFICATE-----rnMIICyDCCAbCgAwIBAgIBADANBgkqhkiG9w0BAQsFADAVMRMwEQYDVQQDEwprdWJlrncm5ldGVzMB4XDTIwMDMz...shorten...xLP56/WE8gmRrn6VOpWRphnJ7syM91UUzLV0tjtdvlkrS6U7QRXxSn2SgCclK5mAyH4UdsRWg=rn-----END CERTIFICATE-----" | out-file c:\ouca\ca.crt -encoding oem ; kubectl config set-cluster aim-cluster-02 --server=https://cluster.company.local:6443 --certificate-authority=C:\k8sca\ca.crt --embed-certs=true ; ..... this part of windows command is ok ..... ; Remove-Item -recurse -force C:\k8sca

Is it possible to fix it?

Dashboard Authentication not working

I've installed this to my cluster using the following steps:

  • Installed Nginx Ingress and Kubernetes Dashboard
  • Created config directory with input.props configured and trusted-ad.pem
  • Created secret directory with input.props configured
  • Ran the install command
  • Verified OpenUnison comes up
# kubectl get pods -n openunison
NAME                                     READY   STATUS      RESTARTS   AGE
check-certs-orchestra-1580868000-52zlj   0/1     Completed   0          37h
check-certs-orchestra-1580954400-ltlg5   0/1     Completed   0          13h
openunison-operator-57cb6966c4-g92dr     1/1     Running     0          42h
openunison-orchestra-c97c7c99b-hzg7t     1/1     Running     0          42h
  • Got the ou-ca.pem content with kubectl get secret ou-tls-certificate -n openunison -o=jsonpath='{..tls\.crt}' | base64 --decode
  • Created /etc/kubernetes/pki/ou-ca.pem with the cert
  • Configured kube-apiserver.yaml with the oicd server flags

I can login to the Auth Portal using AD Credentials, and see my roles from AD

I tested kubectl authentication successfully

I added cluster-admin permission to one of my groups and was able to successfully get all objects via kubectl.

Issue:
When I click on the "Kubernetes Dashboard" tile on the Home Page, I get forwarded to the Dashboard deployed to my cluster as expected, however I get loads of "Unauthorized" notifications, and can see nothing in the cluster.

When I inspect the requests, I can see that there is no Authorization: Bearer <token> header present,

Versions:
Cluster: Kubernetes v1.16.4
Chrome: 79.0.3945.130 (Official Build) (64-bit)
openunison-k8s-login-activedirectory: tremolosecurity/openunison-k8s-login-activedirectory@sha256:b9f5ac8d0212f7675bed5031b0fdcdd7e4cec79add9f050193c9b94586f2392a
Kubernetes Dashboard: kubernetesui/dashboard:v2.0.0-beta8@sha256:fc90baec4fb62b809051a3227e71266c0427240685139bbd5673282715924ea7

feature-request: console access for token based access verification

Hi, The token based access is pretty straightforward. I agree. However, it would be great, if we have the following feature to

  1. spin up a pod in the bg based on the namespace permission
  2. run a job to copy the kubectl config file to the pod
  3. execute kubectl auth can-i ?? [relevant to them], not sure if we can get the ns detail during the call.

It would be a nice to have user permission visual in UI

Thanks
Ram

Using configmap instead of calling from github

command: ["java", "-jar", "/usr/local/artifactdeploy/artifact-deploy.jar", "-extraCertsPath","/etc/extracerts","-installScriptURL", "https://raw.githubusercontent.com/mlbiam/openunison-k8s-login-activedirectory/master/src/main/js/deploy.js","-kubernetesURL","https://kubernetes.default.svc.cluster.local","-rootCaPath","/var/run/secrets/kubernetes.io/serviceaccount/ca.crt","-secretsPath","/etc/secrets/input.props","-tokenPath","/var/run/secrets/kubernetes.io/serviceaccount/token","-deploymentTemplate","https://raw.githubusercontent.com/OpenUnison/openunison-k8s-login-activedirectory/master/src/main/yaml/openunison.yaml"]

it would be easier to create a configmap as a part of the deployment job and use it in the startup rather than calling from the github. artifact deployment was failing as github was not permitted..
Thanks
Ram

ERROR JITAuthMech - Could not execute workflow.... could note reload user

We have tried to connect to AD and Ldap (opendj) both with the same error, after openunison software downloads the user and groups it sends to defaultFailedLogin.jsp, at the pod logs we see a Java error:

[2019-05-16 07:13:02,371][XNIO-1 task-13] INFO  AccessLog - [AzSuccess] - CheckAlive - https://127.0.0.1:8443/check_alive - uid=Anonymous,o=Tremolo - 
        [127.0.0.1] - [f37e0284d9a783689d26c40a90f61b02be18519e7]
[2019-05-16 07:13:05,519][XNIO-1 task-15] INFO  AccessLog - SRCH op=5 con=4 base='o=Data' filter='(uid=xxxxxxxx)' scope='2' attribs=''
[2019-05-16 07:13:05,520][XNIO-1 task-15] INFO  AccessLog - RESULT op=5 con=4 result=0 time=1
[2019-05-16 07:13:05,619][XNIO-1 task-15] INFO  AccessLog - SRCH op=6 con=5 base='ou=activedirectory,o=Data' filter='(&(objectClass=groupOfNames)(member=uid=xxxxxxxx,ou=People,ou=activedirectory,o=Data))' scope='2' attribs=''
[2019-05-16 07:13:05,620][XNIO-1 task-15] INFO  AccessLog - RESULT op=6 con=5 result=0 time=1
[2019-05-16 07:13:05,884][XNIO-1 task-15] INFO  AccessLog - SRCH-RESULT op=6 con=5 entries=21 time=265
[2019-05-16 07:13:05,885][XNIO-1 task-15] INFO  AccessLog - BIND op=6 con=5 dn='uid=xxxxxxxx,ou=People,ou=activedirectory,o=Data'
[2019-05-16 07:13:06,164][XNIO-1 task-15] INFO  AccessLog - RESULT op=6 con=5 result=0 time=279
[2019-05-16 07:13:06,221][XNIO-1 task-15] INFO  ProvisioningEngineImpl - target=jitdb entry=false Add user=xxxxxxxx workflow=jitdb approval=0 group='cn=asdfasdf,ou=Groups,ou=activedirectory,o=Data'
[2019-05-16 07:13:06,221][XNIO-1 task-15] INFO  ProvisioningEngineImpl - target=jitdb entry=false Add user=xxxxxxxx workflow=jitdb approval=0 group='cn=sdfsdfsdf,ou=Groups,ou=activedirectory,o=Data'
[2019-05-16 07:13:06,221][XNIO-1 task-15] INFO  ProvisioningEngineImpl - target=jitdb entry=false Add user=xxxxxxxx workflow=jitdb approval=0 group='cn=gfgreg,ou=Groups,ou=activedirectory,o=Data'
[2019-05-16 07:13:06,221][XNIO-1 task-15] INFO  ProvisioningEngineImpl - target=jitdb entry=false Add user=xxxxxxxx workflow=jitdb approval=0 group='cn=nfgfgrgr,ou=Groups,ou=activedirectory,o=Data'
[2019-05-16 07:13:06,222][XNIO-1 task-15] INFO  ProvisioningEngineImpl - target=jitdb entry=false Add user=xxxxxxxx workflow=jitdb approval=0 group='cn=657ftyy,ou=Groups,ou=activedirectory,o=Data'
[2019-05-16 07:13:06,222][XNIO-1 task-15] INFO  ProvisioningEngineImpl - target=jitdb entry=false Add user=xxxxxxxx workflow=jitdb approval=0 group='cn=tfdyd65rydr,ou=Groups,ou=activedirectory,o=Data'
[2019-05-16 07:13:06,222][XNIO-1 task-15] INFO  ProvisioningEngineImpl - target=jitdb entry=false Add user=xxxxxxxx workflow=jitdb approval=0 group='cn=dftyd56tytf,ou=Groups,ou=activedirectory,o=Data'
[2019-05-16 07:13:06,222][XNIO-1 task-15] INFO  ProvisioningEngineImpl - target=jitdb entry=false Add user=xxxxxxxx workflow=jitdb approval=0 group='cn=dfghdffty,ou=Groups,ou=activedirectory,o=Data'
[2019-05-16 07:13:06,222][XNIO-1 task-15] INFO  ProvisioningEngineImpl - target=jitdb entry=false Add user=xxxxxxxx workflow=jitdb approval=0 group='cn=56y6y6y6y,ou=Groups,ou=activedirectory,o=Data'
[2019-05-16 07:13:06,222][XNIO-1 task-15] INFO  ProvisioningEngineImpl - target=jitdb entry=false Add user=xxxxxxxx workflow=jitdb approval=0 group='cn=Anhgytyty,ou=Groups,ou=activedirectory,o=Data'
[2019-05-16 07:13:06,222][XNIO-1 task-15] INFO  ProvisioningEngineImpl - target=jitdb entry=false Add user=xxxxxxxx workflow=jitdb approval=0 group='cn=hnyu67u7ugyf,ou=Groups,ou=activedirectory,o=Data'
[2019-05-16 07:13:06,222][XNIO-1 task-15] INFO  ProvisioningEngineImpl - target=jitdb entry=false Add user=xxxxxxxx workflow=jitdb approval=0 group='cn=nmyhj567tuty,ou=Groups,ou=activedirectory,o=Data'
[2019-05-16 07:13:06,222][XNIO-1 task-15] INFO  ProvisioningEngineImpl - target=jitdb entry=false Add user=xxxxxxxx workflow=jitdb approval=0 group='cn=yuj76ufgjhj,ou=Groups,ou=activedirectory,o=Data'
[2019-05-16 07:13:06,222][XNIO-1 task-15] INFO  ProvisioningEngineImpl - target=jitdb entry=false Add user=xxxxxxxx workflow=jitdb approval=0 group='cn=fghjrtyuet,ou=Groups,ou=activedirectory,o=Data'
[2019-05-16 07:13:06,222][XNIO-1 task-15] INFO  ProvisioningEngineImpl - target=jitdb entry=false Add user=xxxxxxxx workflow=jitdb approval=0 group='cn=dfghre5dfh,ou=Groups,ou=activedirectory,o=Data'
[2019-05-16 07:13:06,222][XNIO-1 task-15] INFO  ProvisioningEngineImpl - target=jitdb entry=false Add user=xxxxxxxx workflow=jitdb approval=0 group='cn=dfgh54fd,ou=Groups,ou=activedirectory,o=Data'
[2019-05-16 07:13:06,222][XNIO-1 task-15] INFO  ProvisioningEngineImpl - target=jitdb entry=false Add user=xxxxxxxx workflow=jitdb approval=0 group='cn=dfghr5yddh,ou=Groups,ou=activedirectory,o=Data'
[2019-05-16 07:13:06,222][XNIO-1 task-15] INFO  ProvisioningEngineImpl - target=jitdb entry=false Add user=xxxxxxxx workflow=jitdb approval=0 group='cn=dfghdr6tydhgh6,ou=Groups,ou=activedirectory,o=Data'
[2019-05-16 07:13:06,222][XNIO-1 task-15] INFO  ProvisioningEngineImpl - target=jitdb entry=false Add user=xxxxxxxx workflow=jitdb approval=0 group='cn=drtydfthrt6766,ou=Groups,ou=activedirectory,o=Data'
[2019-05-16 07:13:06,222][XNIO-1 task-15] INFO  ProvisioningEngineImpl - target=jitdb entry=false Add user=xxxxxxxx workflow=jitdb approval=0 group='cn=hjyuyu656y5dn,ou=Groups,ou=activedirectory,o=Data'
[2019-05-16 07:13:06,222][XNIO-1 task-15] INFO  ProvisioningEngineImpl - target=jitdb entry=false Add user=xxxxxxxx workflow=jitdb approval=0 group='cn=jdfght66y,ou=Groups,ou=activedirectory,o=Data'
[2019-05-16 07:13:06,224][XNIO-1 task-15] INFO  AccessLog - SRCH op=7 con=6 base='o=Tremolo' filter='(uid=xxxxxxxx)' scope='2' attribs=''
[2019-05-16 07:13:06,224][XNIO-1 task-15] INFO  DumpTransaction - [k8s] Begin Seach - Filter=(uid=xxxxxxxx);Base=o=Tremolo;Scope=2;Attributes=
[2019-05-16 07:13:06,240][XNIO-1 task-15] INFO  DumpTransaction - [k8s] Seach submitted
[2019-05-16 07:13:06,240][XNIO-1 task-15] INFO  AccessLog - RESULT op=7 con=6 result=0 time=16
[2019-05-16 07:13:06,240][XNIO-1 task-15] INFO  AccessLog - SRCH-RESULT op=7 con=6 entries=0 time=16
[2019-05-16 07:13:06,241][XNIO-1 task-15] INFO  DumpTransaction - [k8s] Begin Post Search Complete - Filter=(uid=xxxxxxxx);Base=o=Tremolo;Scope=2;Attributes=[]
[2019-05-16 07:13:06,241][XNIO-1 task-15] INFO  DumpTransaction - [k8s] Post Search Complete Complete
[2019-05-16 07:13:06,241][XNIO-1 task-15] INFO  AccessLog - SRCH-RESULT op=7 con=6 entries=0 time=17
[2019-05-16 07:13:06,241][XNIO-1 task-15] ERROR JITAuthMech - Could not execute workflow 'jitdb' on 'uid=xxxxxxxx,ou=People,ou=activedirectory,o=Data'com.tremolosecurity.provisioning.core.ProvisioningException: Could not reload user
   at com.tremolosecurity.provisioning.core.WorkflowImpl.executeWorkflow(WorkflowImpl.java:598)
   at com.tremolosecurity.provisioning.auth.JITAuthMech.doGet(JITAuthMech.java:126)
   at com.tremolosecurity.provisioning.auth.JITAuthMech.doPost(JITAuthMech.java:75)
   at com.tremolosecurity.proxy.auth.sys.AuthManagerImpl.execAuth(AuthManagerImpl.java:412)
   at com.tremolosecurity.proxy.auth.sys.AuthManagerImpl.nextAuth(AuthManagerImpl.java:125)
   at com.tremolosecurity.proxy.auth.sys.AuthManagerImpl.nextAuth(AuthManagerImpl.java:83)
   at com.tremolosecurity.proxy.auth.FormLoginAuthMech.doPost(FormLoginAuthMech.java:217)
   at com.tremolosecurity.proxy.auth.AuthMgrSys.doAuthMgr(AuthMgrSys.java:190)
   at com.tremolosecurity.embedd.NextEmbSys.nextSys(NextEmbSys.java:126)
   at com.tremolosecurity.proxy.auth.AzSys.doAz(AzSys.java:89)
   at com.tremolosecurity.embedd.NextEmbSys.nextSys(NextEmbSys.java:111)
   at com.tremolosecurity.proxy.auth.AuthSys.doAuth(AuthSys.java:118)
   at com.tremolosecurity.embedd.NextEmbSys.nextSys(NextEmbSys.java:105)
   at com.tremolosecurity.proxy.ConfigSys.doConfig(ConfigSys.java:293)
   at com.tremolosecurity.embedd.NextEmbSys.nextSys(NextEmbSys.java:93)
   at com.tremolosecurity.filter.UnisonServletFilter.doFilter(UnisonServletFilter.java:290)
   at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
   at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
   at io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:84)
   at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62)
   at io.undertow.servlet.handlers.ServletChain$1.handleRequest(ServletChain.java:68)
   at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
   at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:132)
   at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57)
   at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
   at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46)
   at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64)
   at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60)
   at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77)
   at io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43)
   at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
   at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
   at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:292)
   at io.undertow.servlet.handlers.ServletInitialHandler.access$100(ServletInitialHandler.java:81)
   at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:138)
   at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:135)
   at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:48)
   at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)
   at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:272)
   at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:81)
   at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:104)
   at io.undertow.server.Connectors.executeRootHandler(Connectors.java:364)
   at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:830)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
   at java.lang.Thread.run(Thread.java:748)
Caused by: com.tremolosecurity.provisioning.core.ProvisioningException: User uid=xxxxxxxx,ou=People,ou=activedirectory,o=Data does not exist
   at com.tremolosecurity.provisioning.core.WorkflowImpl.executeWorkflow(WorkflowImpl.java:594)
   ... 45 more
com.tremolosecurity.provisioning.core.ProvisioningException: User uid=xxxxxxxx,ou=People,ou=activedirectory,o=Data does not exist
   at com.tremolosecurity.provisioning.core.WorkflowImpl.executeWorkflow(WorkflowImpl.java:594)
   at com.tremolosecurity.provisioning.auth.JITAuthMech.doGet(JITAuthMech.java:126)
   at com.tremolosecurity.provisioning.auth.JITAuthMech.doPost(JITAuthMech.java:75)
   at com.tremolosecurity.proxy.auth.sys.AuthManagerImpl.execAuth(AuthManagerImpl.java:412)
   at com.tremolosecurity.proxy.auth.sys.AuthManagerImpl.nextAuth(AuthManagerImpl.java:125)
   at com.tremolosecurity.proxy.auth.sys.AuthManagerImpl.nextAuth(AuthManagerImpl.java:83)
   at com.tremolosecurity.proxy.auth.FormLoginAuthMech.doPost(FormLoginAuthMech.java:217)
   at com.tremolosecurity.proxy.auth.AuthMgrSys.doAuthMgr(AuthMgrSys.java:190)
   at com.tremolosecurity.embedd.NextEmbSys.nextSys(NextEmbSys.java:126)
   at com.tremolosecurity.proxy.auth.AzSys.doAz(AzSys.java:89)
   at com.tremolosecurity.embedd.NextEmbSys.nextSys(NextEmbSys.java:111)
   at com.tremolosecurity.proxy.auth.AuthSys.doAuth(AuthSys.java:118)
   at com.tremolosecurity.embedd.NextEmbSys.nextSys(NextEmbSys.java:105)
   at com.tremolosecurity.proxy.ConfigSys.doConfig(ConfigSys.java:293)
   at com.tremolosecurity.embedd.NextEmbSys.nextSys(NextEmbSys.java:93)
   at com.tremolosecurity.filter.UnisonServletFilter.doFilter(UnisonServletFilter.java:290)
   at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
   at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
   at io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:84)
   at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62)
   at io.undertow.servlet.handlers.ServletChain$1.handleRequest(ServletChain.java:68)
   at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
   at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:132)
   at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57)
   at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
   at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46)
   at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64)
   at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60)
   at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77)
   at io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43)
   at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
   at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
   at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:292)
   at io.undertow.servlet.handlers.ServletInitialHandler.access$100(ServletInitialHandler.java:81)
   at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:138)
   at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:135)
   at io.undertow.servl
[2019-05-16 07:13:06,241][XNIO-1 task-15] WARN  JITAuthMech - Could not execute workflow jitdb for uid=xxxxxxxx,ou=People,ou=activedirectory,o=Data
com.tremolosecurity.provisioning.core.ProvisioningException: Could not reload user
   at com.tremolosecurity.provisioning.core.WorkflowImpl.executeWorkflow(WorkflowImpl.java:598) ~[unison-server-core-1.0.16.jar:?]
   at com.tremolosecurity.provisioning.auth.JITAuthMech.doGet(JITAuthMech.java:126) [unison-server-core-1.0.16.jar:?]
   at com.tremolosecurity.provisioning.auth.JITAuthMech.doPost(JITAuthMech.java:75) [unison-server-core-1.0.16.jar:?]
   at com.tremolosecurity.proxy.auth.sys.AuthManagerImpl.execAuth(AuthManagerImpl.java:412) [unison-server-core-1.0.16.jar:?]
   at com.tremolosecurity.proxy.auth.sys.AuthManagerImpl.nextAuth(AuthManagerImpl.java:125) [unison-server-core-1.0.16.jar:?]
   at com.tremolosecurity.proxy.auth.sys.AuthManagerImpl.nextAuth(AuthManagerImpl.java:83) [unison-server-core-1.0.16.jar:?]
   at com.tremolosecurity.proxy.auth.FormLoginAuthMech.doPost(FormLoginAuthMech.java:217) [unison-server-core-1.0.16.jar:?]
   at com.tremolosecurity.proxy.auth.AuthMgrSys.doAuthMgr(AuthMgrSys.java:190) [unison-server-core-1.0.16.jar:?]
   at com.tremolosecurity.embedd.NextEmbSys.nextSys(NextEmbSys.java:126) [unison-server-core-1.0.16.jar:?]
   at com.tremolosecurity.proxy.auth.AzSys.doAz(AzSys.java:89) [unison-sdk-1.0.16.jar:?]
   at com.tremolosecurity.embedd.NextEmbSys.nextSys(NextEmbSys.java:111) [unison-server-core-1.0.16.jar:?]
   at com.tremolosecurity.proxy.auth.AuthSys.doAuth(AuthSys.java:118) [unison-server-core-1.0.16.jar:?]
   at com.tremolosecurity.embedd.NextEmbSys.nextSys(NextEmbSys.java:105) [unison-server-core-1.0.16.jar:?]
   at com.tremolosecurity.proxy.ConfigSys.doConfig(ConfigSys.java:293) [unison-server-core-1.0.16.jar:?]
   at com.tremolosecurity.embedd.NextEmbSys.nextSys(NextEmbSys.java:93) [unison-server-core-1.0.16.jar:?]
   at com.tremolosecurity.filter.UnisonServletFilter.doFilter(UnisonServletFilter.java:290) [unison-server-core-1.0.16.jar:?]
   at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61) [undertow-servlet-2.0.19.Final.jar:2.0.19.Final]
   at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131) [undertow-servlet-2.0.19.Final.jar:2.0.19.Final]
   at io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:84) [undertow-servlet-2.0.19.Final.jar:2.0.19.Final]
   at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62) [undertow-servlet-2.0.19.Final.jar:2.0.19.Final]
   at io.undertow.servlet.handlers.ServletChain$1.handleRequest(ServletChain.java:68) [undertow-servlet-2.0.19.Final.jar:2.0.19.Final]
   at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36) [undertow-servlet-2.0.19.Final.jar:2.0.19.Final]
   at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:132) [undertow-servlet-2.0.19.Final.jar:2.0.19.Final]
   at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57) [undertow-servlet-2.0.19.Final.jar:2.0.19.Final]
   at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-2.0.19.Final.jar:2.0.19.Final]
   at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46) [undertow-core-2.0.19.Final.jar:2.0.19.Final]
   at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64) [undertow-servlet-2.0.19.Final.jar:2.0.19.Final]
   at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60) [undertow-core-2.0.19.Final.jar:2.0.19.Final]
   at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77) [undertow-servlet-2.0.19.Final.jar:2.0.19.Final]
   at io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43) [undertow-core-2.0.19.Final.jar:2.0.19.Final]
   at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-2.0.19.Final.jar:2.0.19.Final]
   at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-2.0.19.Final.jar:2.0.19.Final]
   at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:292) [undertow-servlet-2.0.19.Final.jar:2.0.19.Final]
   at io.undertow.servlet.handlers.ServletInitialHandler.access$100(ServletInitialHandler.java:81) [undertow-servlet-2.0.19.Final.jar:2.0.19.Final]
   at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:138) [undertow-servlet-2.0.19.Final.jar:2.0.19.Final]
   at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:135) [undertow-servlet-2.0.19.Final.jar:2.0.19.Final]
   at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:48) [undertow-servlet-2.0.19.Final.jar:2.0.19.Final]
   at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43) [undertow-servlet-2.0.19.Final.jar:2.0.19.Final]
   at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:272) [undertow-servlet-2.0.19.Final.jar:2.0.19.Final]
   at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:81) [undertow-servlet-2.0.19.Final.jar:2.0.19.Final]
   at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:104) [undertow-servlet-2.0.19.Final.jar:2.0.19.Final]
   at io.undertow.server.Connectors.executeRootHandler(Connectors.java:364) [undertow-core-2.0.19.Final.jar:2.0.19.Final]
   at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:830) [undertow-core-2.0.19.Final.jar:2.0.19.Final]
   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_212]
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_212]
   at java.lang.Thread.run(Thread.java:748) [?:1.8.0_212]
Caused by: com.tremolosecurity.provisioning.core.ProvisioningException: User uid=xxxxxxxx,ou=People,ou=activedirectory,o=Data does not exist
   at com.tremolosecurity.provisioning.core.WorkflowImpl.executeWorkflow(WorkflowImpl.java:594) ~[unison-server-core-1.0.16.jar:?]
   ... 45 more
[2019-05-16 07:13:06,242][XNIO-1 task-15] INFO  AccessLog - [AuFail] - scale - https://zzzzzzzzzzzzzzzzzzzzzzzzz/auth/formLogin - cn=none - enterprise_idp [10.99.64.2] - [f7836439c12abd95f253140e27e52023f15feb341]
[2019-05-16 07:13:07,908][XNIO-1 task-4] INFO  AccessLog - [AzSuccess] - k8sIdp - https://127.0.0.1:8443/auth/idp/k8sIdp/.well-known/openid-configuration - uid=Anonymous,o=Tremolo - NONE [127.0.0.1] - [f7eb9f5b3f88bf8572e94445b59e418329e071d46]

The ldap log does not show any error nor access denied and I have the error with both AD and Ldap (using your recommended myvd on ldap and default on AD) so, I missed something.

Using Openldap and Istio Ingress

Hi,
I am trying to implement openunison for authn and authz of my on prem k8s cluster , One of the prerequisites is to have nginx ingress controller installed on the cluster, our cluster does not have it instead we are using istio as our service mesh. Would appreciate if you can help understand on how to use istio ingress gateway. I am not sure if I can use the IP of the kubernetes master to access the openunison app once deployed.

Thanks.

Getting Java.lang.NullPointerException on initial logon.

After we the deployment on initial logon to the k8sou.k8s url we are getting a java.lang.nullpointerexception. Any thoughts as to where I should start looking as to why it is not able to look up the user?

[2019-10-10 16:37:58,703][XNIO-1 task-14] INFO AccessLog - [Error] - scale - https://k8sou.k8s.****/auth/formLogin - uid=Anonymous,o=Tremolo - NONE [10.233.111.0] - [f19d084f5957c6f8bcd97e29b543a2e3bae0db0a0]
[2019-10-10 16:37:58,703][XNIO-1 task-14] ERROR ConfigSys - Could not process request
java.lang.NullPointerException: null
at com.tremolosecurity.proxy.auth.FormLoginAuthMech.doPost(FormLoginAuthMech.java:151) ~[unison-server-core-1.0.17.jar:?]
at com.tremolosecurity.proxy.auth.AuthMgrSys.doAuthMgr(AuthMgrSys.java:193) ~[unison-server-core-1.0.17.jar:?]
at com.tremolosecurity.embedd.NextEmbSys.nextSys(NextEmbSys.java:126) ~[unison-server-core-1.0.17.jar:?]
at com.tremolosecurity.proxy.auth.AzSys.doAz(AzSys.java:89) ~[unison-sdk-1.0.17.jar:?]
at com.tremolosecurity.embedd.NextEmbSys.nextSys(NextEmbSys.java:111) ~[unison-server-core-1.0.17.jar:?]
at com.tremolosecurity.proxy.auth.AuthSys.doAuth(AuthSys.java:118) ~[unison-server-core-1.0.17.jar:?]
at com.tremolosecurity.embedd.NextEmbSys.nextSys(NextEmbSys.java:105) ~[unison-server-core-1.0.17.jar:?]
at com.tremolosecurity.proxy.ConfigSys.doConfig(ConfigSys.java:293) [unison-server-core-1.0.17.jar:?]
at com.tremolosecurity.embedd.NextEmbSys.nextSys(NextEmbSys.java:93) [unison-server-core-1.0.17.jar:?]
at com.tremolosecurity.filter.UnisonServletFilter.doFilter(UnisonServletFilter.java:290) [unison-server-core-1.0.17.jar:?]
at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61) [undertow-servlet-2.0.22.Final.jar:2.0.22.Final]
at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131) [undertow-servlet-2.0.22.Final.jar:2.0.22.Final]
at io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:84) [undertow-servlet-2.0.22.Final.jar:2.0.22.Final]
at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62) [undertow-servlet-2.0.22.Final.jar:2.0.22.Final]
at io.undertow.servlet.handlers.ServletChain$1.handleRequest(ServletChain.java:68) [undertow-servlet-2.0.22.Final.jar:2.0.22.Final]
at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36) [undertow-servlet-2.0.22.Final.jar:2.0.22.Final]
at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:132) [undertow-servlet-2.0.22.Final.jar:2.0.22.Final]
at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57) [undertow-servlet-2.0.22.Final.jar:2.0.22.Final]
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-2.0.22.Final.jar:2.0.22.Final]
at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46) [undertow-core-2.0.22.Final.jar:2.0.22.Final]
at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64) [undertow-servlet-2.0.22.Final.jar:2.0.22.Final]
at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60) [undertow-core-2.0.22.Final.jar:2.0.22.Final]
at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77) [undertow-servlet-2.0.22.Final.jar:2.0.22.Final]
at io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43) [undertow-core-2.0.22.Final.jar:2.0.22.Final]
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-2.0.22.Final.jar:2.0.22.Final]
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-2.0.22.Final.jar:2.0.22.Final]
at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:292) [undertow-servlet-2.0.22.Final.jar:2.0.22.Final]
at io.undertow.servlet.handlers.ServletInitialHandler.access$100(ServletInitialHandler.java:81) [undertow-servlet-2.0.22.Final.jar:2.0.22.Final]
at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:138) [undertow-servlet-2.0.22.Final.jar:2.0.22.Final]
at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:135) [undertow-servlet-2.0.22.Final.jar:2.0.22.Final]
at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:48) [undertow-servlet-2.0.22.Final.jar:2.0.22.Final]
at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43) [undertow-servlet-2.0.22.Final.jar:2.0.22.Final]
at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:272) [undertow-servlet-2.0.22.Final.jar:2.0.22.Final]
at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:81) [undertow-servlet-2.0.22.Final.jar:2.0.22.Final]
at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:104) [undertow-servlet-2.0.22.Final.jar:2.0.22.Final]
at io.undertow.server.Connectors.executeRootHandler(Connectors.java:376) [undertow-core-2.0.22.Final.jar:2.0.22.Final]
at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:830) [undertow-core-2.0.22.Final.jar:2.0.22.Final]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_222]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_222]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_222]

Multi Cluster Authentication

We have multiple on prem clusters and wondering if this can be used authenticate all of the clusters by running one instance of orchestra , is there a way to configure multiple clusters to authenticate with openunison?

Option to remove TMP_CERT from linux command

We are now using a public cert to access our k8s api. For some reason when this CA cert is used inside of the Linux Kubectl config it comes back with a x509 error. If we remove the CA cert from the kube config the command works fine. We don't have this issue with the windows command since it doesn't contain the cert, it "just works".

Is there any easy way to remove the CA cert from the linux kubectl command so that our users can easily copy and paste without having to edit it?

Thanks!

Customizing the look and feel

I am looking to customize the look and feel of the login portal, all jsp's are part of that war file that is packaged. Is there a way to customize the look and feel like changing the logo's ? Thanks

Can't find Kubectl during deployment

Hello,

Working with a basic deployment of K8s using Deepops and during the deployment process of openunison following the readme both containers being stood up run into the issue of:

Processing - '/etc/extracerts/trusted-adldaps.pem' Loading CertUtils Creating openunison keystore Runing kubectl create Exception in thread "main" java.lang.RuntimeException: java.io.IOException: Cannot run program "kubectl": error=2, No such file or directory at jdk.nashorn.internal.runtime.ScriptRuntime.apply(ScriptRuntime.java:397) at jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:449) at jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:406) at jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:402) at jdk.nashorn.api.scripting.NashornScriptEngine.eval(NashornScriptEngine.java:150) at javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:249) at com.tremolosecurity.kubernetes.artifacts.run.RunDeployment.main(RunDeployment.java:123) Caused by: java.io.IOException: Cannot run program "kubectl": error=2, No such file or directory at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048) at java.lang.Runtime.exec(Runtime.java:621) at java.lang.Runtime.exec(Runtime.java:486) at com.tremolosecurity.kubernetes.artifacts.util.K8sUtils.kubectlCreate(K8sUtils.java:778) at jdk.nashorn.internal.scripts.Script$\^eval\_.:program(<eval>:46) at jdk.nashorn.internal.runtime.ScriptFunctionData.invoke(ScriptFunctionData.java:637) at jdk.nashorn.internal.runtime.ScriptFunction.invoke(ScriptFunction.java:494) at jdk.nashorn.internal.runtime.ScriptRuntime.apply(ScriptRuntime.java:393) ... 6 more Caused by: java.io.IOException: error=2, No such file or directory at java.lang.UNIXProcess.forkAndExec(Native Method) at java.lang.UNIXProcess.<init>(UNIXProcess.java:247) at java.lang.ProcessImpl.start(ProcessImpl.java:134) at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029) ... 13 more

Deployed using this command:

curl https://raw.githubusercontent.com/TremoloSecurity/kubernetes-artifact-deployment/master/src/main/bash/deploy_openunison.sh | bash -s /opt/openunison/configmaps /opt/openunison/secrets https://raw.githubusercontent.com/OpenUnison/openunison-k8s-login-activedirectory/master/src/main/yaml/artifact-deployment.yaml

input.props:

`

  • OU_HOST=mylogin.example.org
  • K8S_DASHBOARD_HOST=mydashboard.example.org
  • K8S_URL=https://mymgr1.example.org:6443
  • AD_BASE_DN=OU=General,OU=User,DC=example,DC=org
  • AD_HOST=myad.example.org
  • AD_PORT=636
  • AD_BIND_DN=CN=MYKUBE-LOGIN-SVC-ACCT,OU=Service Accounts,OU=Users,DC=example,DC=org
  • AD_CON_TYPE=ldaps
  • SRV_DNS=false
  • OU_CERT_OU=my-k8s-cluster
  • OU_CERT_O=TestOrg
  • OU_CERT_L=Alexandria
  • OU_CERT_ST=Virgina
  • OU_CERT_C=US
  • USE_K8S_CM=true
  • SESSION_INACTIVITY_TIMEOUT_SECONDS=900
  • MYVD_CONFIG_PATH=WEB-INF/myvd.conf

`

Any advice would be appreciated. Thanks

Group has different DN other than LDAP

Is there any setting that need to be changed to get the group DN asis from LDAP, For example when I log in I see the role as cn=k8s-admins,ou=groups,ou=activedirectory,o=Data where as the group's DN is cn=k8s-admins,ou=groups,dc=example,dc=org, i see a couple of lines in myvd.conf

server.activedirectory.memberof.config.searchBase=ou=activedirectory,o=Data
server.activedirectory.dnmapper.config.localBase=ou=activedirectory,o=Data

can we change that to use our BASE DN , for example "dc=example,dc=org"

Getting StringIndexOutOfBoundsException when trying to deploy

When I run the following command:

curl https://raw.githubusercontent.com/TremoloSecurity/kubernetes-artifact-deployment/master/src/main/bash/deploy_openunison.sh | bash -s /path/to/orchestra-configmaps /path/to/orchestra-secrets https://raw.githubusercontent.com/OpenUnison/openunison-k8s-login-activedirectory/master/src/main/yaml/artifact-deployment.yaml

(Using my path to the folders of course), the artifact-deployment pod gets an Error.
When I look into the pod logs using kubectl log <pod_name> -n openunison-deploy I can see the following error:
Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.String.substring(String.java:1967)
at com.tremolosecurity.kubernetes.artifacts.run.RunDeployment.main(RunDeployment.java:91)

How could this happen?
Looking into the RunDeployment code which is under:
https://github.com/TremoloSecurity/kubernetes-artifact-deployment/blob/master/src/main/java/com/tremolosecurity/kubernetes/artifacts/run/RunDeployment.java

It seems that at line 91 it tries to read the deploymentTemplate, and yet it gets an error there.

Deployment with istio gateway and virtualservice causes certificate issues

I have successfully deployed openunison using nginx ingress controller earlier but I want to leverage istio's ingress gateway with virtual services ,I was partially successful ,I got to the point where I can use my ldap credentials to login and after that both kubectl token and dashboard are not working. Below are the logs that I gathered while debugging.

Steps Followed:

  1. Create openunison namespace and enable istio sidecar so that istio ingress gateway can be used
  2. Deploy openunison operator
  3. Create openunison source secret
    4 . Deploy openunison orchestra by specifying openunison host and dashboard host(both are pointing to istio ingressgateway loadbalancer IP)
  4. Get the tls certificate from ou-tls-certificate and add it all the kubernetes masters
  5. Made sure the dashboard pod is killedand restarted and new certs are created
  6. Create a gateway with https port 443 and use the ou-tls-certficate as credential so that proper certificate is used
  7. Create virtualservice where both the hosts(openunison and dashboard) points to openunison orchestra service
  8. Use tls mode as PASSTHROUGH in istio so that the TLS is not terminated and sent as is.

Below are the errors that I am seeing in dashboard and openunison orchestra pods

Dashboard logs:

2020/06/18 21:50:22 http: TLS handshake error from *.*.*.*:****: remote error: tls: unknown certificate authority
2020/06/18 21:50:22 http: TLS handshake error from 1*.*.*.*:****: remote error: tls: unknown certificate authority
2020/06/18 21:50:23 http: TLS handshake error from 1*.*.*.*:****: remote error: tls: unknown certificate authority
2020/06/18 21:50:23 http: TLS handshake error from *.*.*.*:****: remote error: tls: unknown certificate authority

Openunison orchestra logs:

[2020-06-18 21:50:22,757][XNIO-1 task-5] INFO  AccessLog - [AuSuccess] - k8s - https://dashboardk8sdev.****.com/auth/oidc - uid=*****,ou=shadow,o=Tremolo - 20 / k8s-db-oidc [127.0.0.1] - [fc30cfff31b8ba9fb3c27047e440d79997b796432]
[2020-06-18 21:50:22,908][XNIO-1 task-10] INFO  AccessLog - [AzSuccess] - k8s - https://dashboardk8sdev.*****.com/ - uid=******,ou=shadow,o=Tremolo - oauth2bearer [127.0.0.1] - [fc30cfff31b8ba9fb3c27047e440d79997b796432]
[2020-06-18 21:50:22,985][XNIO-1 task-10] INFO  RetryExec - I/O exception (java.net.SocketException) caught when processing request to {s}->https://kubernetes-dashboard.kube-system.svc.cluster.local:443: Connection reset
[2020-06-18 21:50:22,985][XNIO-1 task-10] INFO  RetryExec - Retrying request to {s}->https://kubernetes-dashboard.kube-system.svc.cluster.local:443
[2020-06-18 21:50:22,995][XNIO-1 task-10] INFO  RetryExec - I/O exception (java.net.SocketException) caught when processing request to {s}->https://kubernetes-dashboard.kube-system.svc.cluster.local:443: Connection reset
[2020-06-18 21:50:22,996][XNIO-1 task-10] INFO  RetryExec - Retrying request to {s}->https://kubernetes-dashboard.kube-system.svc.cluster.local:443
[2020-06-18 21:50:23,114][XNIO-1 task-10] INFO  RetryExec - I/O exception (java.net.SocketException) caught when processing request to {s}->https://kubernetes-dashboard.kube-system.svc.cluster.local:443: Connection reset
[2020-06-18 21:50:23,114][XNIO-1 task-10] INFO  RetryExec - Retrying request to {s}->https://kubernetes-dashboard.kube-system.svc.cluster.local:443
[2020-06-18 21:50:23,190][XNIO-1 task-10] ERROR ProxySys - Error Executing Request :
[2020-06-18 21:50:23,191][XNIO-1 task-10] INFO  AccessLog - [Error] - k8s - https://dashboardk8sdev.*****.com/ - uid=******,ou=shadow,o=Tremolo - NONE [127.0.0.1] - [fc30cfff31b8ba9fb3c27047e440d79997b796432]
[2020-06-18 21:50:23,191][XNIO-1 task-10] ERROR ConfigSys - Could not process request
javax.servlet.ServletException: Could not execute request
        at com.tremolosecurity.proxy.ProxySys.doURI(ProxySys.java:112) ~[unison-server-core-1.0.18.jar:?]
        at com.tremolosecurity.embedd.NextEmbSys.nextSys(NextEmbSys.java:141) ~[unison-server-core-1.0.18.jar:?]
        at com.tremolosecurity.proxy.auth.AuthMgrSys.doAuthMgr(AuthMgrSys.java:135) ~[unison-server-core-1.0.18.jar:?]
        at com.tremolosecurity.embedd.NextEmbSys.nextSys(NextEmbSys.java:126) ~[unison-server-core-1.0.18.jar:?]
        at com.tremolosecurity.proxy.auth.AzSys.doAz(AzSys.java:139) ~[unison-sdk-1.0.18.jar:?]
        at com.tremolosecurity.embedd.NextEmbSys.nextSys(NextEmbSys.java:111) ~[unison-server-core-1.0.18.jar:?]
        at com.tremolosecurity.proxy.auth.AuthSys.doAuth(AuthSys.java:162) ~[unison-server-core-1.0.18.jar:?]
        at com.tremolosecurity.embedd.NextEmbSys.nextSys(NextEmbSys.java:105) ~[unison-server-core-1.0.18.jar:?]
        at com.tremolosecurity.proxy.ConfigSys.doConfig(ConfigSys.java:293) [unison-server-core-1.0.18.jar:?]
        at com.tremolosecurity.embedd.NextEmbSys.nextSys(NextEmbSys.java:93) [unison-server-core-1.0.18.jar:?]
        at com.tremolosecurity.filter.UnisonServletFilter.doFilter(UnisonServletFilter.java:290) [unison-server-core-1.0.18.jar:?]
        at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61) [undertow-servlet-2.0.30.Final.jar:2.0.30.Final]
        at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131) [undertow-servlet-2.0.30.Final.jar:2.0.30.Final]
        at io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:84) [undertow-servlet-2.0.30.Final.jar:2.0.30.Final]
        at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62) [undertow-servlet-2.0.30.Final.jar:2.0.30.Final]
        at io.undertow.servlet.handlers.ServletChain$1.handleRequest(ServletChain.java:68) [undertow-servlet-2.0.30.Final.jar:2.0.30.Final]
        at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36) [undertow-servlet-2.0.30.Final.jar:2.0.30.Final]
        at io.undertow.servlet.handlers.RedirectDirHandler.handleRequest(RedirectDirHandler.java:68) [undertow-servlet-2.0.30.Final.jar:2.0.30.Final]
        at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:132) [undertow-servlet-2.0.30.Final.jar:2.0.30.Final]
        at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57) [undertow-servlet-2.0.30.Final.jar:2.0.30.Final]
        at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-2.0.30.Final.jar:2.0.30.Final]
        at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46) [undertow-core-2.0.30.Final.jar:2.0.30.Final]
        at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64) [undertow-servlet-2.0.30.Final.jar:2.0.30.Final]
        at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60) [undertow-core-2.0.30.Final.jar:2.0.30.Final]
        at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77) [undertow-servlet-2.0.30.Final.jar:2.0.30.Final]
        at io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43) [undertow-core-2.0.30.Final.jar:2.0.30.Final]
        at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-2.0.30.Final.jar:2.0.30.Final]
        at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-2.0.30.Final.jar:2.0.30.Final]
        at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:269) [undertow-servlet-2.0.30.Final.jar:2.0.30.Final]
        at io.undertow.servlet.handlers.ServletInitialHandler.access$100(ServletInitialHandler.java:78) [undertow-servlet-2.0.30.Final.jar:2.0.30.Final]
        at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:133) [undertow-servlet-2.0.30.Final.jar:2.0.30.Final]
        at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:130) [undertow-servlet-2.0.30.Final.jar:2.0.30.Final]
        at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:48) [undertow-servlet-2.0.30.Final.jar:2.0.30.Final]
        at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43) [undertow-servlet-2.0.30.Final.jar:2.0.30.Final]
        at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:249) [undertow-servlet-2.0.30.Final.jar:2.0.30.Final]
        at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:78) [undertow-servlet-2.0.30.Final.jar:2.0.30.Final]
        at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:99) [undertow-servlet-2.0.30.Final.jar:2.0.30.Final]
        at io.undertow.server.Connectors.executeRootHandler(Connectors.java:376) [undertow-core-2.0.30.Final.jar:2.0.30.Final]
        at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:830) [undertow-core-2.0.30.Final.jar:2.0.30.Final]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_252]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_252]
        at java.lang.Thread.run(Thread.java:748) [?:1.8.0_252]
Caused by: java.net.SocketException: Connection reset
        at java.net.SocketInputStream.read(SocketInputStream.java:210) ~[?:1.8.0_252]
        at java.net.SocketInputStream.read(SocketInputStream.java:141) ~[?:1.8.0_252]
        at sun.security.ssl.InputRecord.readFully(InputRecord.java:465) ~[?:1.8.0_252]
        at sun.security.ssl.InputRecord.read(InputRecord.java:503) ~[?:1.8.0_252]
        at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:990) ~[?:1.8.0_252]
        at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1388) ~[?:1.8.0_252]
        at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1416) ~[?:1.8.0_252]
        at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1400) ~[?:1.8.0_252]
        at org.apache.http.conn.ssl.SSLConnectionSocketFactory.createLayeredSocket(SSLConnectionSocketFactory.java:436) ~[httpclient-4.5.12.jar:4.5.12]
        at org.apache.http.conn.ssl.SSLConnectionSocketFactory.connectSocket(SSLConnectionSocketFactory.java:384) ~[httpclient-4.5.12.jar:4.5.12]
        at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:142) ~[httpclient-4.5.12.jar:4.5.12]
        at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:376) ~[httpclient-4.5.12.jar:4.5.12]
        at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:393) ~[httpclient-4.5.12.jar:4.5.12]
        at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:236) ~[httpclient-4.5.12.jar:4.5.12]
        at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:186) ~[httpclient-4.5.12.jar:4.5.12]
        at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:89) ~[httpclient-4.5.12.jar:4.5.12]
        at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110) ~[httpclient-4.5.12.jar:4.5.12]
        at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185) ~[httpclient-4.5.12.jar:4.5.12]
        at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83) ~[httpclient-4.5.12.jar:4.5.12]
        at com.tremolosecurity.proxy.postProcess.UriRequestProcess.postProcess(UriRequestProcess.java:123) ~[unison-server-core-1.0.18.jar:?]
        at com.tremolosecurity.proxy.filter.HttpFilterChainImpl.nextFilter(HttpFilterChainImpl.java:92) ~[unison-server-core-1.0.18.jar:?]
        at com.tremolosecurity.proxy.ProxySys.doURI(ProxySys.java:97) ~[unison-server-core-1.0.18.jar:?]
        ... 41 more

I took the token generated and used with kubectl and got the below response
Unable to connect to the server: Get https://logink8sdev.*****.com/auth/idp/k8sIdp/.well-known/openid-configuration: x509: certificate is valid for openunison.openunison.svc.cluster.local, not logink8sdev.*****.com

My Gateway:

apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
  name: openunison-gateway
  namespace: istio-system
spec:
  selector:
    istio: ingressgateway
  servers:
  - port:
      number: 443
      name: https
      protocol: HTTPS
    hosts:
    - logink8sdev.******.com
    - dashboardk8sdev.*******.com
    tls:
      mode: PASSTHROUGH
      credentialName: ou-tls-certificate

VirtualService:

apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
  name: openunison-vs
  namespace: openunison
spec:
  hosts:
  - logink8sdev.*****.com
  - dashboardk8sdev.******.com
  gateways:
  - istio-system/openunison-gateway
  tls:
  - match:
    - port: 443
      sniHosts:
      - logink8sdev.*****.com
      - dashboardk8sdev.******.com
    route:
    - destination:
        host: openunison-orchestra
        port:
          number: 443

I removed the ingress that is created by openunison since it is not needed to access the service

Is there anything that I am missing here?

Performance problem

Hi, we just start testing the system on our cluster last week and it seems to be slower than we thought. We tried to test with ~5 concurrent user and the worse one is when we ran kubectl get pod and the system response after 5 seconds. We also tried to scale deployment to 4 replicas and it's still slow too. Do you have a way for us to debug? thanks.

We currently running the deployment on kops cluster with 4x m4.xlarge worker nodes and AD is AWS Directory Service.

NullPointerException during artifact deployment

Started with a 1.14.1 Kubernetes cluster using kube-router for networking. Installed ingress-nginx mandatory and nodeport from https://kubernetes.github.io/ingress-nginx/deploy. Created the namespace, secret, and configmap and then depoyed the portal.

Both artifact deployment pods exit Terminated:Error. Logs show:

...
Create OpenUnison Secret
Exception in thread "main" java.lang.NullPointerException
at sun.security.pkcs12.PKCS12KeyStore.createEncryptedData(PKCS12KeyStore.java:1687)
at sun.security.pkcs12.PKCS12KeyStore.engineStore(PKCS12KeyStore.java:1213)
at java.security.KeyStore.store(KeyStore.java:1377)
at com.tremolosecurity.kubernetes.artifacts.util.CertUtils.encodeKeyStore(CertUtils.java:251)
at jdk.nashorn.internal.scripts.Script$^eval_.:program(:319)
at jdk.nashorn.internal.runtime.ScriptFunctionData.invoke(ScriptFunctionData.java:637)
at jdk.nashorn.internal.runtime.ScriptFunction.invoke(ScriptFunction.java:494)
at jdk.nashorn.internal.runtime.ScriptRuntime.apply(ScriptRuntime.java:393)
at jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:449)
at jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:406)
at jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:402)
at jdk.nashorn.api.scripting.NashornScriptEngine.eval(NashornScriptEngine.java:150)
at javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:249)
at com.tremolosecurity.kubernetes.artifacts.run.RunDeployment.main(RunDeployment.java:106)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.