Skip to content

NimTechnology

Trình bày các công nghệ CLOUD một cách dễ hiểu.

  • Kubernetes & Container
    • Docker
    • Kubernetes
      • Ingress
      • Pod
    • Helm Chart
    • OAuth2 Proxy
    • Isito-EnvoyFilter
    • Apache Kafka
      • Kafka
      • Kafka Connect
      • Lenses
    • Vault
    • Longhorn – Storage
    • VictoriaMetrics
    • MetalLB
    • Kong Gateway
  • CI/CD
    • ArgoCD
    • ArgoWorkflows
    • Argo Events
    • Spinnaker
    • Jenkins
    • Harbor
    • TeamCity
    • Git
      • Bitbucket
  • Coding
    • DevSecOps
    • Terraform
      • GCP – Google Cloud
      • AWS – Amazon Web Service
      • Azure Cloud
    • Golang
    • Laravel
    • Python
    • Jquery & JavaScript
    • Selenium
  • Log, Monitor & Tracing
    • DataDog
    • Prometheus
    • Grafana
    • ELK
      • Kibana
      • Logstash
  • BareMetal
    • NextCloud
  • Toggle search form

[kiali] Config authentication on Kiali.

Posted on November 28, 2021November 28, 2021 By nim No Comments on [kiali] Config authentication on Kiali.

Thường thì cài kiali lúc show trang web thì chúng ta sẽ login bằng user “anonymous”
Nếu bạn muốn có authen chuẩn chỉ hơn thì sem bài viết này.

Contents

Toggle
  • Authentication Strategies
    • Anonymous strategy
    • Header strategy
    • OpenID Connect strategy
    • OpenShift strategy
    • Token strategy
  • 1) OpenID Connect strategy
    • 1.1) Config google
  • 1.2) Config kiali
  • 1.3) Filter email login follow domain
    • 1.4) mode read only on kiali

Authentication Strategies

Anonymous strategy

Access Kiali with no authentication.

Header strategy

Run Kiali behind a reverse proxy responsible for injecting the user’s token, or a token with impersonation.

OpenID Connect strategy

Access Kiali requiring authentication through a third-party OpenID Connect provider.

OpenShift strategy

Access Kiali requiring OpenShift authentication.

Token strategy

Access Kiali requiring a Kubernetes ServiceAccount token.

Như cung cấp ở bên trên thì chúng ta có nhiều cách để authen

1) OpenID Connect strategy

1.1) Config google

Đầu tiên là truy cập:
https://console.developers.google.com/

Giờ bạn tìm cách để trở về trang APIs & Services
Mình thấy có 1 warning
Các này dùng để lấy các thông tin của user như(tên tài khoản, email, …)
Thướng thì mình sẽ lấy 3 thông tin này và nhấn update
Nó sẽ đưa chúng ta ra ngoài dashboard

1.2) Config kiali

https://kiali.io/docs/configuration/authentication/openid/
Như bạn add manifest như hướng dẫn sẽ bị lỗi như ảnh bên dưới.

Chúng ta cần add thêm vào configmap của kiali

      strategy: "openid"
      openid:
        client_id: "506853153623-xxxxxxxxtp21hsbb81n7cs7diujetuv9.apps.googleusercontent.com"
        disable_rbac: true
        issuer_uri: "https://accounts.google.com"
        scopes: ["openid", "email"]
        username_claim: "email"
        redirect_uri: "http://kiali.nimtechnology.com/kiali"

Tiếp theo bạn apply 1 secret.

apiVersion: v1
kind: Secret
metadata:
  name: kiali
  namespace: istio-system
  labels:
    app: kiali
type: Opaque
data:
  oidc-secret: "XXXXXXXXXVIb3RCdEUzQUtwT1VnZGktUVNSV0YzUG85WV8="

OK sau khi đã làm sau thì bạn cần redeploy lại kiali.

Và thực hiện đăng nhập thử

như này là ok.

1.3) Filter email login follow domain

Note: I tested that the feature only worked with Kiali 1.43.0 ++

Thường thì nếu cấu hình đăng nhập theo hình thức trên, cứ email nào đăng nhập google thì đều có thể login vào kiali của bạn.

https://kiali.io/docs/configuration/authentication/openid/#configuring-allowed-domains

spec:
  auth:
    openid:
      allowed_domains:
      - example.com
      - foo.com
HÌnh mô tả
Khi login bằng email có đuôi domain khác.
sẽ bị deny

1.4) mode read only on kiali

Ở thời điểm hiện tại thì đối với mình kiali cũng chỉ để view là chính và mình cũng không có nhu cầu config trên kiali

Nếu mình muốn force chỉ view trên kiali thì config như trong configmap kiali

view_only_mode: false

Isito-EnvoyFilter, Kubernetes & Container

Post navigation

Previous Post: [ingress-nginx] Error=”ingress does not contain a valid IngressClass”, After upgrade ingress-nginx(helm 4.x.x, ingress-nginx/controller:v1.1.0)
Next Post: [code/k8s] Lost or not found file inside the container on k8s

More Related Articles

[Harbor] Configure the replications on Harbor Harbor
[Istio] Security authentication và authorization with ISTIO Isito-EnvoyFilter
[Helm Chart] Tìm hiểu fullnameOverride và .fullname trong helm chart. Helm Chart
[Datree] Admission Controllers Or CLI? Kubernetes Policy Validations with Datree Kubernetes & Container
[Sonarqube] Install Sonarqube on Kubernetes and integrate with GitHub Action. Kubernetes & Container
Hướng dẫn đưa secret của Kubernetes thành biến env của pod Kubernetes

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Tham Gia Group DevOps nhé!
Để Nim có nhiều động lực ra nhiều bài viết.
Để nhận được những thông báo mới nhất.

Recent Posts

  • [AWS/EKS] Cache Docker image to accelerate EKS container deployment. July 10, 2025
  • [Laravel] Laravel Helpful June 26, 2025
  • [VScode] Hướng dẫn điều chỉnh font cho terminal June 20, 2025
  • [WordPress] Hướng dấn gửi mail trên WordPress thông qua gmail. June 15, 2025
  • [Bitbucket] Git Clone/Pull/Push with Bitbucket through API Token. June 12, 2025

Archives

  • July 2025
  • June 2025
  • May 2025
  • April 2025
  • March 2025
  • February 2025
  • January 2025
  • December 2024
  • November 2024
  • October 2024
  • September 2024
  • August 2024
  • July 2024
  • June 2024
  • May 2024
  • April 2024
  • March 2024
  • February 2024
  • January 2024
  • December 2023
  • November 2023
  • October 2023
  • September 2023
  • August 2023
  • July 2023
  • June 2023
  • May 2023
  • April 2023
  • March 2023
  • February 2023
  • January 2023
  • December 2022
  • November 2022
  • October 2022
  • September 2022
  • August 2022
  • July 2022
  • June 2022
  • May 2022
  • April 2022
  • March 2022
  • February 2022
  • January 2022
  • December 2021
  • November 2021
  • October 2021
  • September 2021
  • August 2021
  • July 2021
  • June 2021

Categories

  • BareMetal
    • NextCloud
  • CI/CD
    • Argo Events
    • ArgoCD
    • ArgoWorkflows
    • Git
      • Bitbucket
    • Harbor
    • Jenkins
    • Spinnaker
    • TeamCity
  • Coding
    • DevSecOps
    • Golang
    • Jquery & JavaScript
    • Laravel
    • NextJS 14 & ReactJS & Type Script
    • Python
    • Selenium
    • Terraform
      • AWS – Amazon Web Service
      • Azure Cloud
      • GCP – Google Cloud
  • Kubernetes & Container
    • Apache Kafka
      • Kafka
      • Kafka Connect
      • Lenses
    • Docker
    • Helm Chart
    • Isito-EnvoyFilter
    • Kong Gateway
    • Kubernetes
      • Ingress
      • Pod
    • Longhorn – Storage
    • MetalLB
    • OAuth2 Proxy
    • Vault
    • VictoriaMetrics
  • Log, Monitor & Tracing
    • DataDog
    • ELK
      • Kibana
      • Logstash
    • Fluent
    • Grafana
    • Prometheus
  • Uncategorized
  • Admin

Copyright © 2025 NimTechnology.