Skip to content

Use "inversion of control" pattern for HTTP proxies, OIDC #150

@ethnt

Description

@ethnt

Let services provide the information for their own HTTP proxies and OIDC information. For example, for Netbox:

{ config, hosts, ... }: {
  services.netbox = { enable = true; };

  provides.services.netbox = {
    name = "Netbox";
    http = {
      host = hosts.matrix;
      port = config.services.netbox.port;
      proxy = {
        enable = true;
        domain = "netbox.e10.camp";
      };
    };

    oidc = {
      client_id = "...";
      scopes = [ "" ];
    };
  };
}

Then within consumers of these (i.e., bastion), look through every host for this configuration (filtering as need be — monitor will only take from the monitor host, etc).

Metadata

Metadata

Assignees

No one assigned

    Labels

    improvementImproving existing code

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions