Skip to content

Admin HTTP API #25

Open
Open
@h2non

Description

Use this issue as feature discussion for further configuration entities.

Configuration entities

For now I've defined 3 different entities to manage vinxi servers:

Scope

Scope represents an generic HTTP scope level of configuration. It's moslty analog to a multiplexer matcher. Scopes are defined by a set of rules and can host a set of plugins to provide specific behavior.

An example of a scope could be when a user want to enable certain plugins based on certain conditions, such as, specific HTTP verb, hostname, URL path, header, client IP...

Scopes are inmutable. You can only remove them.

Rule

Rule represents a simple logic who inspect an incoming HTTP request and determine if the configured rule is passed. It's used to compose and reuse matching logic across scopes and allows to enable plugins based on the rule resolution state.

Rules are inmutable. You can only remove them.

Plugin

Plugin is pretty much as an standard middleware with an additional decorator API to provide plugin specific logic (e.g: enable, disable, remove...). Plugins are in general a simple wrapper with a concrete interface of vinxi components, such as: forward, replay, intercept, metrics...

Proposed API interface

/ -> Entry API point with generic info
/health -> Heartbeat endpoint
/catalog -> Return supported rules and plugins entities (useful for API consumers)
/plugins -> List, register or remove generic plugins that will be always executed
/scopes -> List, register, remove generic configuration scopes
/scopes/:scope -> List current scope details
/scopes/:scope/rules -> List, register, remove scope specific rules
/scopes/:scope/plugins -> List and register scope specific plugins
/instances -> List managed vinxi instances
/instances/:instance -> Instance specific details
/instances/:instance/scopes -> Instance specific scopes
/instances/:instance/scopes/:scope -> Scope specific details
/instances/:instance/scopes/:scope/plugins -> Plugin details
/instances/:instance/scopes/:scope/plugins/:plugin -> Plugin specific /instances/:instance/scopes/:scope/plugins/:plugin -> Plugin specific details
/instances/:instance/scopes/:scope/rules -> Scope specific rules
/instances/:instance/scopes/:scope/rules/:rule -> Rule details

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions