Add SFTP data plane microservice with API key authentication and scoped permissions#12
Draft
Add SFTP data plane microservice with API key authentication and scoped permissions#12
Conversation
Co-authored-by: okdargy <76412158+okdargy@users.noreply.github.com>
Co-authored-by: okdargy <76412158+okdargy@users.noreply.github.com>
… fix wildcard scopes Co-authored-by: okdargy <76412158+okdargy@users.noreply.github.com>
Co-authored-by: okdargy <76412158+okdargy@users.noreply.github.com>
Co-authored-by: okdargy <76412158+okdargy@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add SFTP data plane microservice with auditing and authentication
Add SFTP data plane microservice with API key authentication and scoped permissions
Jan 17, 2026
veryCrunchy
requested changes
Jan 17, 2026
| @@ -0,0 +1,43 @@ | |||
| -- Migration to add api_keys table for SFTP service | |||
Member
There was a problem hiding this comment.
Use gorm automigrate.
Ensure the table name doesn't collide with existing tables.
| @@ -0,0 +1,98 @@ | |||
| #!/bin/bash | |||
Member
There was a problem hiding this comment.
Users need to be able to manage their SFTP keys from the dashboard.
These keys should be bound to a game server or deployment.
| ) | ||
|
|
||
| // Permission represents SFTP access permissions | ||
| type Permission string |
Member
There was a problem hiding this comment.
Use our existing permissions scope system.
…mission scope system
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements SFTP file transfer service with API key authentication, scoped read/write permissions, and full audit logging. Files organized by org/user for isolation.
Core Components
apps/shared/pkg/sftp/- SFTP server using Go SSH/SFTP libraries/var/lib/sftp/{org_id}/{user_id}/apps/sftp-service/- Microservice following existing patternsapps/shared/pkg/database/api_keys.go- APIKey modelAPI Key Scopes
Usage
Docker Configuration
sftp-datafor files and host keyDatabase Migration
Run
apps/sftp-service/migrations/001_create_api_keys_table.sqlto create theapi_keystable with proper indexes and foreign keys.Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
connectrpc.com/update-job-proxy /update-job-proxy c mpile 03.o 5907�� tp-service/go.mod mpile pkg/mod/golang.org/toolchain@v0.0.1-go1.25.0.lin-importcfg --gdwarf-5(dns block)/update-job-proxy /update-job-proxy -o br-45b5622b4a20 -j DOCKER-ISOLATION-STAGE-2 e359ba6.0 noop /home/dependabot/bin/test --root /var/run/docker/cat-file /usr/bin/readlinblob test -e /etc/ssl/certs/6b99d060.0 readlink e/git-remote-https ECC_P256_Certifi/usr/sbin/iptables /tmp/runc-proces--wait(dns block)/update-job-proxy /update-job-proxy -o br-00bbb1616124 -j DOCKER-ISOLATION-STAGE-2 ot_CA_2021.pem /usr/lib/git-cor/usr/share/ca-certificates/mozilla/Go_Daddy_Class_2_CA.crt /usr/bin/test 994f93e71e4039ddgit 42304cf5:go.mod /bin/git test -e 860aaa6.0 git(dns block)go.googlesource.com/update-job-proxy /update-job-proxy c mpile 03.o 5907�� tp-service/go.mod mpile pkg/mod/golang.org/toolchain@v0.0.1-go1.25.0.lin-importcfg --gdwarf-5(dns block)/update-job-proxy /update-job-proxy -o br-45b5622b4a20 -j DOCKER-ISOLATION-STAGE-2 e359ba6.0 noop /home/dependabot/bin/test --root /var/run/docker/cat-file /usr/bin/readlinblob test -e /etc/ssl/certs/6b99d060.0 readlink e/git-remote-https ECC_P256_Certifi/usr/sbin/iptables /tmp/runc-proces--wait(dns block)/update-job-proxy /update-job-proxy -o br-00bbb1616124 -j DOCKER-ISOLATION-STAGE-2 ot_CA_2021.pem /usr/lib/git-cor/usr/share/ca-certificates/mozilla/Go_Daddy_Class_2_CA.crt /usr/bin/test 994f93e71e4039ddgit 42304cf5:go.mod /bin/git test -e 860aaa6.0 git(dns block)go.opentelemetry.io/update-job-proxy /update-job-proxy c mpile 03.o 5907�� tp-service/go.mod mpile pkg/mod/golang.org/toolchain@v0.0.1-go1.25.0.lin-importcfg --gdwarf-5(dns block)/update-job-proxy /update-job-proxy -o br-45b5622b4a20 -j DOCKER-ISOLATION-STAGE-2 e359ba6.0 noop /home/dependabot/bin/test --root /var/run/docker/cat-file /usr/bin/readlinblob test -e /etc/ssl/certs/6b99d060.0 readlink e/git-remote-https ECC_P256_Certifi/usr/sbin/iptables /tmp/runc-proces--wait(dns block)/update-job-proxy /update-job-proxy -o br-00bbb1616124 -j DOCKER-ISOLATION-STAGE-2 ot_CA_2021.pem /usr/lib/git-cor/usr/share/ca-certificates/mozilla/Go_Daddy_Class_2_CA.crt /usr/bin/test 994f93e71e4039ddgit 42304cf5:go.mod /bin/git test -e 860aaa6.0 git(dns block)go.yaml.in/update-job-proxy /update-job-proxy c mpile 03.o 5907�� tp-service/go.mod mpile pkg/mod/golang.org/toolchain@v0.0.1-go1.25.0.lin-importcfg --gdwarf-5(dns block)/update-job-proxy /update-job-proxy -o br-45b5622b4a20 -j DOCKER-ISOLATION-STAGE-2 e359ba6.0 noop /home/dependabot/bin/test --root /var/run/docker/cat-file /usr/bin/readlinblob test -e /etc/ssl/certs/6b99d060.0 readlink e/git-remote-https ECC_P256_Certifi/usr/sbin/iptables /tmp/runc-proces--wait(dns block)/update-job-proxy /update-job-proxy -o br-00bbb1616124 -j DOCKER-ISOLATION-STAGE-2 ot_CA_2021.pem /usr/lib/git-cor/usr/share/ca-certificates/mozilla/Go_Daddy_Class_2_CA.crt /usr/bin/test 994f93e71e4039ddgit 42304cf5:go.mod /bin/git test -e 860aaa6.0 git(dns block)google.golang.org/update-job-proxy /update-job-proxy c mpile 03.o 5907�� tp-service/go.mod mpile pkg/mod/golang.org/toolchain@v0.0.1-go1.25.0.lin-importcfg --gdwarf-5(dns block)/update-job-proxy /update-job-proxy -o br-45b5622b4a20 -j DOCKER-ISOLATION-STAGE-2 e359ba6.0 noop /home/dependabot/bin/test --root /var/run/docker/cat-file /usr/bin/readlinblob test -e /etc/ssl/certs/6b99d060.0 readlink e/git-remote-https ECC_P256_Certifi/usr/sbin/iptables /tmp/runc-proces--wait(dns block)/update-job-proxy /update-job-proxy -o br-00bbb1616124 -j DOCKER-ISOLATION-STAGE-2 ot_CA_2021.pem /usr/lib/git-cor/usr/share/ca-certificates/mozilla/Go_Daddy_Class_2_CA.crt /usr/bin/test 994f93e71e4039ddgit 42304cf5:go.mod /bin/git test -e 860aaa6.0 git(dns block)gopkg.in/update-job-proxy /update-job-proxy c mpile 03.o 5907�� tp-service/go.mod mpile pkg/mod/golang.org/toolchain@v0.0.1-go1.25.0.lin-importcfg --gdwarf-5(dns block)/update-job-proxy /update-job-proxy -o br-45b5622b4a20 -j DOCKER-ISOLATION-STAGE-2 e359ba6.0 noop /home/dependabot/bin/test --root /var/run/docker/cat-file /usr/bin/readlinblob test -e /etc/ssl/certs/6b99d060.0 readlink e/git-remote-https ECC_P256_Certifi/usr/sbin/iptables /tmp/runc-proces--wait(dns block)/update-job-proxy /update-job-proxy -o br-00bbb1616124 -j DOCKER-ISOLATION-STAGE-2 ot_CA_2021.pem /usr/lib/git-cor/usr/share/ca-certificates/mozilla/Go_Daddy_Class_2_CA.crt /usr/bin/test 994f93e71e4039ddgit 42304cf5:go.mod /bin/git test -e 860aaa6.0 git(dns block)gorm.io/update-job-proxy /update-job-proxy c mpile 03.o 5907�� tp-service/go.mod mpile pkg/mod/golang.org/toolchain@v0.0.1-go1.25.0.lin-importcfg --gdwarf-5(dns block)/update-job-proxy /update-job-proxy -o br-45b5622b4a20 -j DOCKER-ISOLATION-STAGE-2 e359ba6.0 noop /home/dependabot/bin/test --root /var/run/docker/cat-file /usr/bin/readlinblob test -e /etc/ssl/certs/6b99d060.0 readlink e/git-remote-https ECC_P256_Certifi/usr/sbin/iptables /tmp/runc-proces--wait(dns block)/update-job-proxy /update-job-proxy -o br-00bbb1616124 -j DOCKER-ISOLATION-STAGE-2 ot_CA_2021.pem /usr/lib/git-cor/usr/share/ca-certificates/mozilla/Go_Daddy_Class_2_CA.crt /usr/bin/test 994f93e71e4039ddgit 42304cf5:go.mod /bin/git test -e 860aaa6.0 git(dns block)nhooyr.io/update-job-proxy /update-job-proxy c mpile 03.o 5907�� tp-service/go.mod mpile pkg/mod/golang.org/toolchain@v0.0.1-go1.25.0.lin-importcfg --gdwarf-5(dns block)/update-job-proxy /update-job-proxy -o br-45b5622b4a20 -j DOCKER-ISOLATION-STAGE-2 e359ba6.0 noop /home/dependabot/bin/test --root /var/run/docker/cat-file /usr/bin/readlinblob test -e /etc/ssl/certs/6b99d060.0 readlink e/git-remote-https ECC_P256_Certifi/usr/sbin/iptables /tmp/runc-proces--wait(dns block)/update-job-proxy /update-job-proxy -o br-00bbb1616124 -j DOCKER-ISOLATION-STAGE-2 ot_CA_2021.pem /usr/lib/git-cor/usr/share/ca-certificates/mozilla/Go_Daddy_Class_2_CA.crt /usr/bin/test 994f93e71e4039ddgit 42304cf5:go.mod /bin/git test -e 860aaa6.0 git(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
Created from VS Code via the GitHub Pull Request extension.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.