Git Product home page Git Product logo

kubeseal-webgui's Introduction

Hi there πŸ‘‹

I`m a cloud engineer and Kubernetes/OpenShift admin from Germany!

  • πŸ”­ I’m currently working on kubeseal-webgui

Connect with me:

_jaydee94_ | Twitter


Languages and Tools:

Visual Studio Code

HTML5

CSS3

Vue.js

Git

GitHub

Terminal

Python

Helm

Kubernetes


kubeseal-webgui's People

Contributors

cz4rny avatar datreeio[bot] avatar dependabot[bot] avatar fschumacher avatar jaydee94 avatar renovate[bot] avatar therealjsie avatar thomasvitt avatar uip9av6y 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  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

kubeseal-webgui's Issues

String generator to fill value

Hi,

An idea to improve it would be to add a string generator in the value fields:

For example :

  • Add a suffix button to generate string on click
  • Add second suffix button to open a popup on click and configure generator: length, characters type, etc..

Unable to setup kubeseal-webgui using provided helm chart

I am trying to install helm chart for kubeseal-webgui on k8s cluster provided in docker desktop.

followed steps mentioned in readme. Below is my values.yaml file.

I do have one doubt regarding api.url is this default value okay ? Do we need to expose this endpoint ourself or is it taken care by helm chart ?

replicaCount: 1

annotations: {}

api:
  # The value of api.url should be set to the public-accessible http endpoint (ingress url or OpenShift route).
  # api.url will be generated into config.json ConfigMap of the UI. This statically served JSON file
  # is used by the UI to locate the API.
  url: http://localhost:8080
  image:
    repository: kubesealwebgui/api
    tag: 3.1.0
  environment: {}
ui:
  image:
    repository: kubesealwebgui/ui
    tag: 3.1.0
image:
  pullPolicy: Always

nameOverride: ""
fullnameOverride: ""

# Optionally setup a display name for your kubeseal-webgui instance.
displayName: ""

# Set this value to false if you already have a default serviceaccount who is allowed to list namespaces.
serviceaccount:
  create: false

# Setup resources for the pod
resources:
  limits:
    cpu: 100m
    memory: 256Mi
  requests:
    cpu: 20m
    memory: 256Mi

# Optionally use a OpenShift-Route
# If 'hostname' is an empty string (""), OpenShift will create a hostname for you.
route:
  enabled: false
  hostname: ""
  tls:
    termination: edge
    insecureEdgeTerminationPolicy: None

sealedSecrets:
  autoFetchCert: false
  controllerName: sealed-secrets-controller
  controllerNamespace: kube-system
  ## Public Certificate of your Sealed-Secrets Controller.
  ## Login to your cluster with kubectl.
  ## Run kubeseal --fetch-cert --controller-name <your-sealed-secrets-controller> --controller-namespace <sealed-secrets-controller-namespace>
  ## Paste Cert as multiline YAML
  cert: |
    -----BEGIN CERTIFICATE-----
    MIIEzDCCArSgAwIBAgIQTu139c2EK+zC/rwU4DxhYzANBgkqhkiG9w0BAQsFADAA
    ............................................
    ...........................................
    -----END CERTIFICATE-----

Getting below error on UI and not able to list any namespace , I have also fetched the cert.pem from kubeseal-controller and provided same in values file as mentioned in the project. I have no clue what is wrong in here.

image

encrypt multiple values and name the keys

It should be possible to dynamically add keys to encrypt into the Form.
The Bootstrap Form should be dynamic and have a Add key Button.
All encrypted keys should be generated into the output HTML Page as single encrypted value but also into a complete kubernetes object.

App could not list namespace and encrypt

Describe the bug
After deploy using helm chart I did port forwarding and the app could not list namespaces

To Reproduce
Just deploy and no namespace in list

Expected behavior
Be able to list namespace

Screenshots
image

Add support for encrypting binary data

Add support for encrypting binary data in sealed secret objects.
Maybe an optional upload button for providing the content of a file like e.g. a java keystore that should be encrypted.

[Improvement] Don't use the Flask development server in production

Hi,

First off I think this project is really cool. I was thinking of building custom tooling on top of kubeseal until I found this app πŸ™‚ .

I don't think it's a great idea to run the Flask development server in production environments, see https://github.com/Jaydee94/kubeseal-webgui/blob/master/Dockerfile.api#L24 .

Some alternatives:

I could handle this task myself if you're interested.

TypeError: Failed to fetch

Hello,

First off, awesome project!

I've deployed it succesfully on our OpenShift testenvironment (v4.9)

But when i'm trying the namespace dropdown i'm getting the following message:

Error while encoding sensitive data. Please contact your administrator and try again later.

Error message:
TypeError: Failed to fetch

serviceaccount.create is set to true.
i've checked if the (namespace list) clusterrole & clusterrolebinding is active on the cluster
and the service account is attached to the pod(s)

Do you have any pointers on how to troubleshoot this? I'm not seeing pointers in pod logs or namespace events...

Missing spec.ingressClassName in Ingress

Describe the bug
Ingress class provided by this chart only support set behavior by annotation.
So, to select ingress class, need specify an annotation kubernetes.io/ingress.class

But Kubernetes has deprecated this annotation
cf. https://kubernetes.io/blog/2020/04/02/improvements-to-the-ingress-api-in-kubernetes-1.18/#deprecating-the-ingress-class-annotation

This annotation is replaced by spec ingressClassName
cf . https://kubernetes.io/blog/2020/04/02/improvements-to-the-ingress-api-in-kubernetes-1.18/#specifying-the-class-of-an-ingress

Expected behavior

  • Add spec.ingressClassName in template ingress.yaml
  • Add a variable ingress.class in values.yaml to set this new spec

Add dockerignore file

Describe the bug
Currently every file from the repo gets copied when COPY is used. We can and should ignore quiet a few of them like __pycache__ dirs.

To Reproduce
Steps to reproduce the behavior:

  1. Build container
  2. look for __pycache__ directories

Expected behavior
Those development files should not be part of the container image

Use a Python virtual env inside the API container

Describe the bug
When building the API container, we get a warning about not using a virtual env together with the root account:

WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv

To Reproduce
Steps to reproduce the behavior:

  1. Go to the checked out source
  2. build the API container by typing docker build -t api:latest -f Dockerfile.api .
  3. Search for the warning above

Expected behavior
No such warning should appear while building the container

Add dropdown field for selecting namespace

Add Support for a dropdown field instead of typing the name space name. The app should determine all namespaces from the current kubernetes cluster and provide them as a dropdown field.

4.0.0 auto fetch doesn't work because of changed directory

Describe the bug
the fetch script moved with the new docker image to ${APP_HOME}/kubeseal-webgui/bin/kubeseal-fetch.sh

the helm chart is referencing the script at /kubeseal-webgui/bin/kubeseal-fetch.sh which doesn't exist anymore

To Reproduce
Deploy the helm chart 4.0.0 with sealedSecrets.autoFetchCert: true

Expected behavior
Should reference the correct script

Logs
Error: failed to start container "fetch-cert": Error response from daemon: OCI runtime create failed: container_linux.go:349: starting container process caused "exec: "/kubeseal-webgui/bin/kubeseal-fetch.sh": stat /kubeseal-webgui/bin/kubeseal-fetch.sh: no such file or directory": unknown

Include mock into origin python api with toggle

After we migrated to fastapi, we can get rid of the mock. The dummy return values when not using kubernetes can be returned by the origin api by using a specific toggle (MOCK_ENABLED).
So we don`t have to maintain multiple code bases.

Add dark mode

Optional dark Mode for the webgui.
Just for fun ☺️

Fetch certs not working

I have deployed kubeseal-webgui with helm chart with autofetch to true in the values.yaml.

But I got this error.

  Warning  Failed     16s (x3 over 36s)  kubelet            Error: failed to create containerd task: failed to create shim: OCI runtime create failed: container_linux.go:380: starting container process caused: exec: "/kubeseal-webgui/bin/kubeseal-fetch.sh": permission denied: unknown

Display all rendered keys besides the complete SealedSecret object

When a secret is rendered we currently only display a complete SealedSecrets YAML object.
Sometimes you just need the value of a specific key.

We could display all rendered key-value pairs inside a collapsable if a single value is needed. There we can also display a little copy button for comfortable usage πŸ˜‰

Add option to use annotations

Thanks you for the tools.
Great job !!

Could we improve it by adding annotation handler ?

In fact Sealed Secret encrypt data but also annotations. So adding annotation on SealedSecret object will not add it when unseal it.
We have to add first annotation on the Secret ressource and only then we can seal it in order to take annotation in count.

Can we improve the GUI for letting us add some annotations like :

sealedsecrets.bitnami.com/managed
sealedsecrets.bitnami.com/namespace-wide
sealedsecrets.bitnami.com/cluster-wide

Copy button didn't work

Describe the bug
After sealed the key and value I click copy button but it doesn't work

To Reproduce
Steps to reproduce the behavior:

  1. Sealed key and value pairs
  2. Click on Encrypt
  3. Click on Copy
  4. See error

Expected behavior
Copy button works

Screenshots
image

Add support for user impersonation

users request the namespaces from the kubeseal-webui api,
which in return accesses the kubernetes api using a service
account.
given that the role associated with the service account has
not restrictions on which namespace it can see, all available
namespaces are returned. therefor a user can see all namespaces
even when they themself have no access to it.

kubernetes support impersonating users when performing
requests against its API, which would allow the kubeseal-webui
API to limit its namespace result to the namespaces relevant
to the current user.

currently kubeseal-webui has no concept of users and/or groups.
this information however can be passed on e.g. via headers.

proposal

add support for reading user information from request headers,
and use it to dispatch impersonated kubernetes api requests.

we have deployed kubeseal-webui behind a reverse proxy which
performs user authentication and can forward the authentication
information via headers (e.g. X-Forwarded-User).

given that the impersonation support in the python library
is limited, i would suggest to limit impersonation to
users for now (as opposed to users and groups)

this feature must be explicitly enabled by admins in environments
where the authentication information can be trusted, otherwise
users can make requests with rogue authentication headers:

  • enable_impersonation (default: false)
    use provided user information and dispatch kubernetes
    requests with impersonation information
  • impersonation_user_header (default: X-Forwarded-User)
    incoming header to look for user information. if empty/not
    set, downstream requests to the kubernetes API will not
    be made just as before (i.e. without any impersonation data)

the role resource must also be adjusted, to include the
impersonation permission (must also be explicitly enabled)

- apiGroups: [""]
  resources: ["users"]
  verbs: ["impersonate"]

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.