matrix-org / matrix-org/matrix-spec

appservice registration yaml: allow `{as,hs}_token` to be specified as `{as,hs_token_path}` instead

Open
#1,250 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

improvement
Dominant language
HTML
Stars
330
Forks
150
Avg merge
2h 21m
Merged PRs (30d)
3

Description

Is your feature request related to a problem? Please describe.

This feature is useful for static, secure, repeatable deployments of Matrix servers and appservices. In my exact scenario, without getting into too many details (since they probably abstract over other deployment tools/styles), the visibility/access to the appservice configuration is somewhat necessarily different than the visibility/access to things that need to remain encrypted end-to-end, like the as_token and hs_token.

Luckily, most softwares tend to accept these types of tokens via a path reference or an environment variable, or otherwise have some type of {re,in}direction that allows a relatively elegant or native solution to this layering bit.

Describe the solution you'd like

A revision to the appservice registration yaml file to allow specifying either as_token/as_token_path and either hs_token/hs_token_path.

It might be worth specifying that the file pointed to by *_token_path will be stripped of leading and trailing whitespaces on load, before use.

Describe alternatives you've considered

In this specific situation, there's not a lot of better choices. We can do some creative things like write a service startup script that edits the config files at the very last instance, but this is fairly inelegant, and again, I think this is a fairly common pattern among software for similar types of reasons.

Additional context

None; thank you for working on Matrix and/or reading/considering this!

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the appservice registration YAML definition in this specification repository and read how the existing as_token and hs_token fields are described. Update the specification to allow the corresponding as_token_path and hs_token_path alternatives, including the requested whitespace-stripping behavior. Done means the accepted alternatives and precedence are unambiguous in the registration format.

Written by the indexing model from the issue text.

Assessment

Tech stack
yaml
Domain
documentation
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.