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

[Scrubber] API Gateway config scrubbing #3225

Merged
merged 37 commits into from
May 1, 2024
Merged

Conversation

rokatyy
Copy link
Contributor

@rokatyy rokatyy commented Apr 19, 2024

The purpose of this PR is to implement configuration scrubbing for API gateways, allowing sensitive data to be stored in a Kubernetes secret instead of directly in the CRD. While we already had scrubbing logic in place, it was specific to function configuration. This PR introduces an abstract interface and scrubber struct, making it easier to inherit and use them in the future if needed. Additionally to this, all the scrubbing logic which had been in platform/deployer was moved under scrubber to be more consistent, keep scrubbing in one place and avoid code duplications.

Also, in order to support masking sensitive fields when creating API Gateway via nuctl, new flag --mask-sensitive-fields was added. Default behaviour is not to mask, because we want to keep backward compatibility.

Jira - https://iguazio.atlassian.net/browse/NUC-170, part of https://iguazio.atlassian.net/browse/NUC-114

…ployer functionality in order to make evething as agnostic as possible
…ployer functionality in order to make evething as agnostic as possible
@rokatyy rokatyy changed the title [WIP] API Gateway config ascrubbing [WIP] API Gateway config scrubbing Apr 19, 2024
Copy link
Contributor

@TomerShor TomerShor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know its still WIP, but added some comments to consider

pkg/common/scrubber.go Outdated Show resolved Hide resolved
pkg/common/scrubber.go Outdated Show resolved Hide resolved
pkg/common/scrubber.go Outdated Show resolved Hide resolved
pkg/common/scrubber.go Outdated Show resolved Hide resolved
pkg/common/scrubber.go Outdated Show resolved Hide resolved
pkg/platform/kube/apigatewayres/lazy.go Outdated Show resolved Hide resolved
pkg/platform/kube/apigatewayres/lazy.go Outdated Show resolved Hide resolved
pkg/platform/kube/platform.go Show resolved Hide resolved
pkg/platform/kube/platform.go Show resolved Hide resolved
pkg/platform/platform.go Outdated Show resolved Hide resolved
pkg/platform/kube/platform.go Outdated Show resolved Hide resolved
pkg/platform/kube/apigatewayres/lazy.go Outdated Show resolved Hide resolved
@github-actions github-actions bot added the docs label Apr 24, 2024
@rokatyy rokatyy marked this pull request as ready for review April 24, 2024 15:39
@rokatyy rokatyy changed the title [WIP] API Gateway config scrubbing [Scrubber] API Gateway config scrubbing Apr 25, 2024
pkg/common/scrubber.go Outdated Show resolved Hide resolved
pkg/common/scrubber.go Outdated Show resolved Hide resolved
pkg/common/scrubber.go Outdated Show resolved Hide resolved
pkg/common/scrubber.go Outdated Show resolved Hide resolved
pkg/functionconfig/scrubber.go Outdated Show resolved Hide resolved
pkg/platform/abstract/platform.go Outdated Show resolved Hide resolved
pkg/platform/apigateway.go Outdated Show resolved Hide resolved
pkg/platform/apigateway.go Outdated Show resolved Hide resolved
pkg/platform/kube/apigatewayres/lazy.go Show resolved Hide resolved
pkg/platform/kube/platform.go Outdated Show resolved Hide resolved
Copy link
Contributor

@TomerShor TomerShor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Last few things, otherwise we are there 👍

pkg/common/scrubber.go Outdated Show resolved Hide resolved
pkg/functionconfig/scrubber.go Outdated Show resolved Hide resolved
pkg/platform/kube/platform.go Show resolved Hide resolved
Copy link
Contributor

@TomerShor TomerShor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀 🚀

@TomerShor TomerShor merged commit c6b24b9 into nuclio:development May 1, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants