Giter VIP home page Giter VIP logo

Comments (1)

davidfrickert avatar davidfrickert commented on May 20, 2024

Sample terraform file for testing (token needs to be replaced)
Deploy as is to test that LDAP outpost does not become healthy, uncomment last lines to add dummy application and check that outpost becomes healthy.

terraform {
  required_providers {
    authentik = {
      source = "goauthentik/authentik"
      version = "2024.4.0"
    }
  }
}

provider "authentik" {
  url   = "https://authentik.127.0.0.1.sslip.io"
  token = "REPLACEME"
  insecure = true
}

data "authentik_flow" "default-authentication-flow" {
  slug = "default-authentication-flow"
}

resource "authentik_service_connection_kubernetes" "local" {
  name  = "local"
  local = true
}

resource "authentik_provider_ldap" "default" {
  name         = "authentik-ldap-provider"
  base_dn      = "dc=example,dc=com"
  bind_flow    = data.authentik_flow.default-authentication-flow.id
}

resource "authentik_outpost" "outpost-ldap" {
  name = "ldap"
  type = "ldap"
  service_connection = authentik_service_connection_kubernetes.local.id
  config = jsonencode({
    "log_level": "info",
    "authentik_host": "http://authentik-server.keycloak-iam.svc.cluster.local",
    "docker_map_ports": true,
    "kubernetes_replicas": 1,
    "kubernetes_namespace": "keycloak-iam",
    "authentik_host_browser": "",
    "object_naming_template": "ak-outpost-%(name)s",
    "authentik_host_insecure": false,
    "kubernetes_service_type": "ClusterIP",
    "kubernetes_image_pull_secrets": [],
    "kubernetes_disabled_components": [],
    "kubernetes_ingress_annotations": {},
    "kubernetes_ingress_secret_name": "authentik-outpost-tls"
  })
  protocol_providers = [
    authentik_provider_ldap.default.id
  ]
}

# for some reason the LDAP outpost won't start without an app configured to use it...?
# resource "authentik_application" "dummy-ldap" {
#  name              = "dummy-ldap"
#  slug              = "dummy-ldap"
#  protocol_provider = authentik_provider_ldap.default.id
# }

from authentik.

Related Issues (20)

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.