Skip to content

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

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).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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