Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

First release of userinfo fecher tool (with Keycloak backend) #477

Closed
12 of 23 tasks
Tracked by #438
soenkeliebau opened this issue Sep 27, 2023 · 5 comments
Closed
12 of 23 tasks
Tracked by #438

First release of userinfo fecher tool (with Keycloak backend) #477

soenkeliebau opened this issue Sep 27, 2023 · 5 comments

Comments

@soenkeliebau
Copy link
Member

soenkeliebau commented Sep 27, 2023

Description

The Stackable Data Plattform should integrate with identity providers to allow authorizing access based on arbitrary user attributes from those providers. The most common attributes will probably be groups and roles a user has, but other use cases are certain to come up, so this should be able to retrieve user configurable attributes as well.

Development

The current idea is to develop the userinfofetcher as a module in the opa operator https://github.com/stackabletech/opa-operator, to avoid additional build complexity by spinning this out into a project of its own.
If need be, it can still be moved out of the repo at a later date.

PoC code for this functionality is available in this branch: https://github.com/stackabletech/opa-operator/tree/spike/user-info-fetcher

Functionality

For an initial release the following items must be achieved:

Must Have

Preview Give feedback
  1. fhennig
  2. sbernauer

ADR

Some issues to be covered in the ADR:

  • Caching
  • Centralized component to minimize components that talk to AD/etc.

CRD Design

Configuration of the userinfofetcher will be done inside of the existing Opa crd.

Option 1

---
apiVersion: opa.stackable.tech/v1alpha1
kind: OpaCluster
metadata:
  name: simple-opa
spec:
  clusterConfig:
    userInfoProvider:
      keycloak:
         url: http://iaeiaeiea:5678 # maybe pull this out into a configmap?
         credentialsSecret:
         tls: TlsConfig
         cache:
            maxEntries: ...  # all the cache settings are to be understood as placeholders
            ttl: ...
            evictionStrategy: ..
         extraAttributes:
            stackableField1: remoteField1
  image:
    productVersion: "0.51.0"
    stackableVersion: "23.7.0"
  servers:
    roleGroups:
      default:
        selector:
          matchLabels:
            kubernetes.io/os: linux

Option 2

@sbernauer : have some decouplign and say its too complicated

Deployment

Currently the proposed deployment is for the UserInfoFetcher to run as a sidecar container in the opa pods. This would allow the userinfofetcher to only listen on the loopback interface and not be available from outside of the pod.
For this reason it should be possible to not run tls for the userinfofetcher, as the pod would need to be breached to compromise it - and at that point in time an attacker would have access to the certificate and key that can be used to authenticate as well.

image

For the first iteration it is agreed to go with the deployment model shown in the diagram above.

At later stages we may want to look into adding a central userinfofetcher as caching layer to avoid ddos-ing identity providers.

Definition of Done Checklist

  • Not all of these items are applicable to all PRs, the author should update this template to only leave the boxes in that are relevant
  • Please make sure all these things are done and tick the boxes

Author

Preview Give feedback

Reviewer

Preview Give feedback

Acceptance

Preview Give feedback
@soenkeliebau soenkeliebau transferred this issue from stackabletech/issues Sep 27, 2023
@soenkeliebau soenkeliebau changed the title First release of group mapper tool (with Keycloak backend) First release of userinfo fecher tool (with Keycloak backend) Sep 28, 2023
@fhennig fhennig moved this from Next to Refinement: In Progress in Stackable Engineering Sep 29, 2023
@sbernauer sbernauer moved this from Refinement: In Progress to Development: In Progress in Stackable Engineering Oct 4, 2023
@fhennig fhennig moved this from Development: In Progress to Ready for Development in Stackable Engineering Oct 16, 2023
@fhennig fhennig removed their assignment Oct 16, 2023
@sbernauer sbernauer moved this from Ready for Development to Development: In Progress in Stackable Engineering Oct 23, 2023
@sbernauer sbernauer moved this from Development: In Progress to Development: Waiting for Review in Stackable Engineering Oct 30, 2023
@sbernauer sbernauer moved this from Development: Waiting for Review to Development: In Review in Stackable Engineering Nov 6, 2023
@sbernauer sbernauer moved this from Development: In Review to Development: In Progress in Stackable Engineering Dec 13, 2023
@lfrancke lfrancke assigned NickLarsenNZ and unassigned nightkr Jan 10, 2024
@lfrancke lfrancke closed this as completed Feb 1, 2024
@lfrancke lfrancke moved this from In Progress to Done in Stackable End-to-End Coordination Feb 1, 2024
@lfrancke
Copy link
Member

Reopening for #517

@lfrancke lfrancke reopened this Feb 16, 2024
@lfrancke lfrancke moved this from Done to In Progress in Stackable End-to-End Coordination Feb 16, 2024
@sbernauer
Copy link
Member

I think I personally would make a new Issue to change the common tls struct to default to webPki (or similar) across all CRDs. But I leave it to you ;)

@lfrancke
Copy link
Member

That is to be refined.
If you're interested let us know
https://stackable-workspace.slack.com/archives/C06GWEEG602/p1707484224033069

@sbernauer
Copy link
Member

I'm happy to let others refine, just tried to prevent this from some form of feature creeping 😅

@lfrancke
Copy link
Member

lfrancke commented Mar 5, 2024

Closing again, we have the default TLS in a separate ticket now.

@lfrancke lfrancke closed this as completed Mar 5, 2024
@lfrancke lfrancke moved this from In Progress to Done in Stackable End-to-End Coordination Mar 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

6 participants