|
| 1 | +# 002 Technical Implementation of access Authorization for Greenhouse Plugins |
| 2 | + |
| 3 | +- Status: draft |
| 4 | +- Deciders: Fabian Ruff, Esther Schmitz, Arno Uhlig, Uwe Mayer, David Rochow |
| 5 | +- Date: 2023-03-09 |
| 6 | +- Tags: greenhouse |
| 7 | + |
| 8 | +## Context and Problem Statement |
| 9 | + |
| 10 | +Greenhouse is a Platform that aims to aggregate a variety of Applications into a single Platform using a Plugin Concept |
| 11 | +that allows Applications to be integrated into Greenhouse while being maintained and developed in a distributed manner. |
| 12 | + |
| 13 | +Furthermore, it intentionally does not support multi-tenancy across Plugin Instances to enable segregation between |
| 14 | +tenants and make the Platform usable by totally unrelated LoB's. |
| 15 | + |
| 16 | +This Decision record is about the technical solution how we do Authorizations for Plugins. |
| 17 | + |
| 18 | +## Decision Drivers |
| 19 | + |
| 20 | +- Enables support of multiple Identity Providers |
| 21 | + * To allow Organizations to use their own IdP |
| 22 | +- Open for adoption |
| 23 | + * allows also Plugin Backends to be used that are not developed internally |
| 24 | +- Support of Role Mapping within Greenhouse |
| 25 | + * Supports the usage for the considered solutions of ADR-1 |
| 26 | +- Supports running Greenhouse components in a single Kubernetes Cluster |
| 27 | + * On kubernetes you can only configure one OIDC Provider |
| 28 | +- Implementation effort |
| 29 | +- Maintenance effort |
| 30 | + |
| 31 | +## Considered Options |
| 32 | + |
| 33 | +- Team Sync during Deployment |
| 34 | +- Team Sync by Plugin during runtime |
| 35 | +- Usage of internal IdP for Group Ownership Rewriting based on Greenhouse mappings |
| 36 | + |
| 37 | +## Decision Outcome |
| 38 | + |
| 39 | +Chosen option: **"Usage of internal IdP for Group Ownership Rewriting based on Greenhouse mappings"** |
| 40 | + |
| 41 | +### Positive Consequences |
| 42 | + |
| 43 | +- Overall best decision driver ratings |
| 44 | +- Most flexible solution |
| 45 | +- Does not require additional syncing of mappings between Greenhouse and Plugins |
| 46 | +- We are in control of the OIDC Provider that is used for Authorization of Requests on Plugins |
| 47 | +- The authentication is still happening on the external Identity Provider |
| 48 | +- Only of the Solutions that solves the Kubernetes problem(just supports one OIDC Provider) by design |
| 49 | + |
| 50 | +### Negative Consequences |
| 51 | + |
| 52 | +- Introduction of an additional Open Source Project |
| 53 | +- In case we need to support Plugin Backends outside Converged Cloud, we would need to expose the internal OIDC |
| 54 | + Provider (somehow) or build an additional proxy solution. |
| 55 | +- This solution is expected to require the most implementation and maintenance effort |
| 56 | + |
| 57 | +## Pros and Cons of the Options |
| 58 | + |
| 59 | +### Team Sync during Deployment |
| 60 | + |
| 61 | + |
| 62 | + |
| 63 | +This Solution is using an external OIDC Provider. |
| 64 | +Within Greenhouse, mappings from OIDC Groups to Plugin Permissions are done, |
| 65 | +and the respective mappings are distributed to Plugins during the deployment of the Plugins. |
| 66 | + |
| 67 | +This means any change in the mapping of a Team/Role would require a re-deployment of the Plugins to happen. |
| 68 | + |
| 69 | +| Decision Driver | Rating | Reason | |
| 70 | +|-----------------------------------------------------------------------|--------|-----------------------------------------------------------------------------------------------------------------------------| |
| 71 | +| Enables support of multiple Identity Providers | + | possible | |
| 72 | +| Open for adoption | + | Would use 100% standard OIDC for Authorization on Plugin Side. Organizations would be forced to use a OIDC Provider though. | |
| 73 | +| Support of Role Mapping within Greenhouse | + | supports with variations in the details all options | |
| 74 | +| Supports running Greenhouse components in a single Kubernetes Cluster | - | unclear, how this would be solved | |
| 75 | +| Implementation effort | o | | |
| 76 | +| Maintenance effort | - | The required redeployment of components | |
| 77 | + |
| 78 | +### Team Sync by Plugin during runtime |
| 79 | + |
| 80 | + |
| 81 | + |
| 82 | +In this Solution we use a external OIDC provider as well. |
| 83 | +The mapping of Access Levels for Plugins is also done within Greenhouse. |
| 84 | +The difference is that the mapping of OIDC Groups to permissions is fetched from the Plugin at runtime from |
| 85 | +Greenhouse using API endpoint implemented for this purpose. |
| 86 | + |
| 87 | +| Decision Driver | Rating | Reason | |
| 88 | +|-----------------------------------------------------------------------|--------|----------------------------------------------------------------------------------------| |
| 89 | +| Enables support of multiple Identity Providers | + | possible | |
| 90 | +| Open for adoption | - | Would use for the Authorization a custom implementation through retrieving the mapping | |
| 91 | +| Support of Role Mapping within Greenhouse | + | supports with variations in the implementation details all options | |
| 92 | +| Supports running Greenhouse components in a single Kubernetes Cluster | - | unclear how this would be solved | |
| 93 | +| Implementation effort | - | We would need to create an additional API Endpoint | |
| 94 | +| Maintenance effort | o | Neutral | |
| 95 | + |
| 96 | +### Usage of internal IdP for Group Ownership Rewriting based on Greenhouse mappings |
| 97 | + |
| 98 | + |
| 99 | + |
| 100 | +This Solution does use a federated IdP that handles the authorization. |
| 101 | +The Idea here is to us any external Authentication Provider (which could also be something else than an OIDC provider) |
| 102 | +and use an internal OIDC Provider that is used for the Plugins and Kubernetes. |
| 103 | +Within the internal OIDC Provider, we can then create the Group to Role mappings for plugins before issuing a token. |
| 104 | +This way, the token would include all custom Permission mappings that we configure in Greenhouse using a standardized |
| 105 | +approach. |
| 106 | +This also means that Plugins can either advertise their expected naming schema with their Plugin Schema or |
| 107 | +use a default pre-defined schema that all Greenhouse Plugins are using. |
| 108 | + |
| 109 | +| Decision Driver | Rating | Reason | |
| 110 | +|-----------------------------------------------------------------------|--------|------------------------------------------------------------------------------------------------------------------------------------------------------------------| |
| 111 | +| Enables support of multiple Identity Providers | +++ | Even allows usage of other Protocols than OIDC | |
| 112 | +| Open for adoption | +++ | Openness for different Identity providers enables Organizations to have a very flexible choice | |
| 113 | +| Support of Role Mapping within Greenhouse | + | Supports all the variants | |
| 114 | +| Supports running Greenhouse components in a single Kubernetes Cluster | +++ | We would internally use only our internal OIDC Provider for issuing tokens which would solve the problem that Kubernetes Clusters only support one OIDC Provider | |
| 115 | +| Implementation effort | - | Probably more effort to implement than other solutions | |
| 116 | +| Maintenance effort | - | Probably more maintenance effort than the other solutions especially due to the additional open source dependencies introduced | |
| 117 | + |
| 118 | +## Related Decision Records |
| 119 | + |
| 120 | +**001 Logical Authorization Concept for Greenhouse Plugins** |
0 commit comments