-
Notifications
You must be signed in to change notification settings - Fork 0
Add SFTP data plane microservice with API key authentication and scoped permissions #12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
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>
| @@ -0,0 +1,43 @@ | |||
| -- Migration to add api_keys table for SFTP service | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use gorm automigrate.
Ensure the table name doesn't collide with existing tables.
| @@ -0,0 +1,98 @@ | |||
| #!/bin/bash | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use our existing permissions scope system.
…mission scope system
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.