Skip to content

Add application service support to blueprints - #74

Merged
kegsay merged 7 commits into
masterfrom
eric/appservice-support
Feb 23, 2021
Merged

Add application service support to blueprints#74
kegsay merged 7 commits into
masterfrom
eric/appservice-support

Conversation

@MadLittleMods

@MadLittleModsMadLittleMods commented Feb 22, 2021

Copy link
Copy Markdown
Contributor

Add application service support to blueprints

  • Only supports defining a basic app service
  • In tests, you can use the app service as_token to interact with the homserver API
  • Does not support defining the namespaces part of the app service registration config
  • Does not support a mocked/stubbed actual app service that the homeserver calls back to at the URL

Split out from #68


Comment threadinternal/docker/builder.go Outdated
Comment threadinternal/docker/builder.go
Comment threadinternal/b/hs_with_application_service.go
Comment threadinternal/b/blueprints.go Outdated
Comment threadinternal/b/blueprints.go Outdated
Comment threadinternal/docker/builder.go Outdated
Comment threadinternal/docker/builder.go Outdated
Comment threadinternal/docker/builder.go
Comment threadinternal/docker/builder.go Outdated
var buf bytes.Buffer
tw := tar.NewWriter(&buf)
err = tw.WriteHeader(&tar.Header{
Name: fmt.Sprintf("/appservices/%s.yaml", asID),

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please can we do filepath escapes here, as I would like to in the future allow untrusted Blueprint input.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume you mean using client.GjsonEscape?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean path escaping so you can't have an asID like ../../../etc/passwd

@kegsaykegsay left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Love it, just a few minor issues to resolve!

Comment threadinternal/docker/builder.go
@kegsay

Copy link
Copy Markdown
Member

LGTM

@kegsay
kegsay merged commit 5d63375 into masterFeb 23, 2021
@MadLittleMods

Copy link
Copy Markdown
ContributorAuthor

Woot! Thanks for the review @kegsay 🐊

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@MadLittleMods@kegsay