You've already forked ionscale
mirror of
https://github.com/jsiebens/ionscale.git
synced 2026-04-05 12:32:58 +01:00
feat: add support for oidc providers and users
This commit is contained in:
@@ -5,6 +5,7 @@ go 1.18
|
||||
require (
|
||||
github.com/apparentlymart/go-cidr v1.1.0
|
||||
github.com/caddyserver/certmagic v0.16.1
|
||||
github.com/coreos/go-oidc/v3 v3.2.0
|
||||
github.com/glebarez/sqlite v1.4.3
|
||||
github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.0.0-rc.2
|
||||
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0
|
||||
@@ -24,6 +25,7 @@ require (
|
||||
github.com/xhit/go-str2duration/v2 v2.0.0
|
||||
golang.org/x/crypto v0.0.0-20220427172511-eb4f295cb31f
|
||||
golang.org/x/net v0.0.0-20220407224826-aac1ed45d8e3
|
||||
golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c
|
||||
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c
|
||||
google.golang.org/grpc v1.44.0
|
||||
google.golang.org/protobuf v1.27.1
|
||||
@@ -85,8 +87,10 @@ require (
|
||||
golang.org/x/tools v0.1.11-0.20220413170336-afc6aad76eb1 // indirect
|
||||
golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f // indirect
|
||||
golang.zx2c4.com/wireguard/windows v0.4.10 // indirect
|
||||
google.golang.org/appengine v1.6.6 // indirect
|
||||
google.golang.org/genproto v0.0.0-20210126160654-44e461bb6506 // indirect
|
||||
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
|
||||
gopkg.in/square/go-jose.v2 v2.5.1 // indirect
|
||||
modernc.org/libc v1.14.12 // indirect
|
||||
modernc.org/mathutil v1.4.1 // indirect
|
||||
modernc.org/memory v1.0.7 // indirect
|
||||
|
||||
@@ -92,6 +92,8 @@ github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWH
|
||||
github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
|
||||
github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8=
|
||||
github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI=
|
||||
github.com/coreos/go-oidc/v3 v3.2.0 h1:2eR2MGR7thBXSQ2YbODlF0fcmgtliLCfr9iX6RW11fc=
|
||||
github.com/coreos/go-oidc/v3 v3.2.0/go.mod h1:rEJ/idjfUyfkBit1eI1fvyr+64/g9dcKpAm8MJMesvo=
|
||||
github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=
|
||||
github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
|
||||
github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA=
|
||||
@@ -643,6 +645,7 @@ golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLL
|
||||
golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
|
||||
golang.org/x/net v0.0.0-20200421231249-e086a090c8fd/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
|
||||
golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
|
||||
golang.org/x/net v0.0.0-20200505041828-1ed23360d12c/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
|
||||
golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
|
||||
golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
|
||||
golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
|
||||
@@ -667,6 +670,7 @@ golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4Iltr
|
||||
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||
golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
|
||||
golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c h1:pkQiBZBvdos9qq4wBAHqlzuZHEXo07pqV06ef90u1WI=
|
||||
golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
|
||||
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
||||
@@ -849,6 +853,7 @@ google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7
|
||||
google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
|
||||
google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0=
|
||||
google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=
|
||||
google.golang.org/appengine v1.6.6 h1:lMO5rYAqUxkmaj76jAkRUvt5JZgFymx/+Q5Mzfivuhc=
|
||||
google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc=
|
||||
google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
|
||||
google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
|
||||
@@ -931,6 +936,8 @@ gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
|
||||
gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
|
||||
gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o=
|
||||
gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo=
|
||||
gopkg.in/square/go-jose.v2 v2.5.1 h1:7odma5RETjNHWJnR32wx8t+Io4djHE1PqxCFx3iiZ2w=
|
||||
gopkg.in/square/go-jose.v2 v2.5.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI=
|
||||
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
|
||||
gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI=
|
||||
gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74=
|
||||
|
||||
+10
-9
@@ -4,6 +4,7 @@ import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"github.com/jsiebens/ionscale/internal/domain"
|
||||
"github.com/jsiebens/ionscale/pkg/gen/api"
|
||||
"github.com/muesli/coral"
|
||||
"gopkg.in/yaml.v2"
|
||||
@@ -44,8 +45,14 @@ func getACLConfig() *coral.Command {
|
||||
return err
|
||||
}
|
||||
|
||||
var p domain.ACLPolicy
|
||||
|
||||
if err := json.Unmarshal(resp.Value, &p); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if asJson {
|
||||
marshal, err := json.MarshalIndent(resp.Policy, "", " ")
|
||||
marshal, err := json.MarshalIndent(&p, "", " ")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -53,7 +60,7 @@ func getACLConfig() *coral.Command {
|
||||
fmt.Println()
|
||||
fmt.Println(string(marshal))
|
||||
} else {
|
||||
marshal, err := yaml.Marshal(resp.Policy)
|
||||
marshal, err := yaml.Marshal(&p)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -91,12 +98,6 @@ func setACLConfig() *coral.Command {
|
||||
return err
|
||||
}
|
||||
|
||||
var policy api.Policy
|
||||
|
||||
if err := json.Unmarshal(rawJson, &policy); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
client, c, err := target.createGRPCClient()
|
||||
if err != nil {
|
||||
return err
|
||||
@@ -108,7 +109,7 @@ func setACLConfig() *coral.Command {
|
||||
return err
|
||||
}
|
||||
|
||||
_, err = client.SetACLPolicy(context.Background(), &api.SetACLPolicyRequest{TailnetId: tailnet.Id, Policy: &policy})
|
||||
_, err = client.SetACLPolicy(context.Background(), &api.SetACLPolicyRequest{TailnetId: tailnet.Id, Value: rawJson})
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -0,0 +1,127 @@
|
||||
package cmd
|
||||
|
||||
import (
|
||||
"context"
|
||||
"github.com/jsiebens/ionscale/pkg/gen/api"
|
||||
"github.com/muesli/coral"
|
||||
"github.com/rodaine/table"
|
||||
)
|
||||
|
||||
func authMethodsCommand() *coral.Command {
|
||||
command := &coral.Command{
|
||||
Use: "auth-methods",
|
||||
Short: "Manage ionscale auth methods",
|
||||
}
|
||||
|
||||
command.AddCommand(listAuthMethods())
|
||||
command.AddCommand(createAuthMethodCommand())
|
||||
|
||||
return command
|
||||
}
|
||||
|
||||
func listAuthMethods() *coral.Command {
|
||||
command := &coral.Command{
|
||||
Use: "list",
|
||||
Short: "List auth methods",
|
||||
Long: `List auth methods in this ionscale instance. Example:
|
||||
|
||||
$ ionscale auth-methods list`,
|
||||
}
|
||||
|
||||
var target = Target{}
|
||||
target.prepareCommand(command)
|
||||
|
||||
command.RunE = func(command *coral.Command, args []string) error {
|
||||
|
||||
client, c, err := target.createGRPCClient()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer safeClose(c)
|
||||
|
||||
resp, err := client.ListAuthMethods(context.Background(), &api.ListAuthMethodsRequest{})
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
tbl := table.New("ID", "NAME", "TYPE")
|
||||
for _, m := range resp.AuthMethods {
|
||||
tbl.AddRow(m.Id, m.Name, m.Type)
|
||||
}
|
||||
tbl.Print()
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
return command
|
||||
}
|
||||
|
||||
func createAuthMethodCommand() *coral.Command {
|
||||
command := &coral.Command{
|
||||
Use: "create",
|
||||
Short: "Create a new auth method",
|
||||
}
|
||||
|
||||
command.AddCommand(createOIDCAuthMethodCommand())
|
||||
|
||||
return command
|
||||
}
|
||||
|
||||
func createOIDCAuthMethodCommand() *coral.Command {
|
||||
command := &coral.Command{
|
||||
Use: "oidc",
|
||||
Short: "Create a new auth method",
|
||||
SilenceUsage: true,
|
||||
}
|
||||
|
||||
var methodName string
|
||||
|
||||
var clientId string
|
||||
var clientSecret string
|
||||
var issuer string
|
||||
|
||||
var target = Target{}
|
||||
|
||||
target.prepareCommand(command)
|
||||
command.Flags().StringVarP(&methodName, "name", "n", "", "")
|
||||
command.Flags().StringVar(&clientId, "client-id", "", "")
|
||||
command.Flags().StringVar(&clientSecret, "client-secret", "", "")
|
||||
command.Flags().StringVar(&issuer, "issuer", "", "")
|
||||
|
||||
_ = command.MarkFlagRequired("name")
|
||||
_ = command.MarkFlagRequired("client-id")
|
||||
_ = command.MarkFlagRequired("client-secret")
|
||||
_ = command.MarkFlagRequired("issuer")
|
||||
|
||||
command.RunE = func(command *coral.Command, args []string) error {
|
||||
|
||||
client, c, err := target.createGRPCClient()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer safeClose(c)
|
||||
|
||||
req := &api.CreateAuthMethodRequest{
|
||||
Type: "oidc",
|
||||
Name: methodName,
|
||||
Issuer: issuer,
|
||||
ClientId: clientId,
|
||||
ClientSecret: clientSecret,
|
||||
}
|
||||
|
||||
resp, err := client.CreateAuthMethod(context.Background(), req)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
tbl := table.New("ID", "NAME", "TYPE")
|
||||
tbl.AddRow(resp.AuthMethod.Id, resp.AuthMethod.Name, resp.AuthMethod.Type)
|
||||
tbl.Print()
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
return command
|
||||
}
|
||||
@@ -10,6 +10,7 @@ func Command() *coral.Command {
|
||||
rootCmd.AddCommand(derpMapCommand())
|
||||
rootCmd.AddCommand(serverCommand())
|
||||
rootCmd.AddCommand(versionCommand())
|
||||
rootCmd.AddCommand(authMethodsCommand())
|
||||
rootCmd.AddCommand(tailnetCommand())
|
||||
rootCmd.AddCommand(authkeysCommand())
|
||||
rootCmd.AddCommand(machineCommands())
|
||||
|
||||
@@ -45,6 +45,8 @@ func migrate(db *gorm.DB, repository domain.Repository) error {
|
||||
&domain.ServerConfig{},
|
||||
&domain.Tailnet{},
|
||||
&domain.TailnetConfig{},
|
||||
&domain.AuthMethod{},
|
||||
&domain.Account{},
|
||||
&domain.User{},
|
||||
&domain.AuthKey{},
|
||||
&domain.Machine{},
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
package domain
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"github.com/jsiebens/ionscale/internal/util"
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
type Account struct {
|
||||
ID uint64 `gorm:"primary_key;autoIncrement:false"`
|
||||
|
||||
ExternalID string
|
||||
LoginName string
|
||||
AuthMethodID uint64
|
||||
}
|
||||
|
||||
func (r *repository) GetOrCreateAccount(ctx context.Context, authMethodID uint64, externalID, loginName string) (*Account, bool, error) {
|
||||
account := &Account{}
|
||||
id := util.NextID()
|
||||
|
||||
tx := r.withContext(ctx).
|
||||
Where(Account{AuthMethodID: authMethodID, ExternalID: externalID}).
|
||||
Attrs(Account{ID: id, LoginName: loginName}).
|
||||
FirstOrCreate(account)
|
||||
|
||||
if tx.Error != nil {
|
||||
return nil, false, tx.Error
|
||||
}
|
||||
|
||||
return account, account.ID == id, nil
|
||||
}
|
||||
|
||||
func (r *repository) GetAccount(ctx context.Context, id uint64) (*Account, error) {
|
||||
var account Account
|
||||
tx := r.withContext(ctx).Take(&account, "id = ?", id)
|
||||
|
||||
if errors.Is(tx.Error, gorm.ErrRecordNotFound) {
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
if tx.Error != nil {
|
||||
return nil, tx.Error
|
||||
}
|
||||
|
||||
return &account, nil
|
||||
}
|
||||
@@ -9,6 +9,7 @@ import (
|
||||
)
|
||||
|
||||
type ACLPolicy struct {
|
||||
Groups map[string][]string `json:"groups,omitempty"`
|
||||
Hosts map[string]string `json:"hosts,omitempty"`
|
||||
ACLs []ACL `json:"acls"`
|
||||
}
|
||||
@@ -157,6 +158,26 @@ func (a *aclEngine) expandMachineAlias(m *Machine, alias string, src bool) []str
|
||||
}
|
||||
}
|
||||
|
||||
if strings.Contains(alias, "@") && !m.HasTags() && m.HasUser(alias) {
|
||||
return []string{m.IPv4.String(), m.IPv6.String()}
|
||||
}
|
||||
|
||||
if strings.HasPrefix(alias, "group:") && !m.HasTags() {
|
||||
users, ok := a.policy.Groups[alias]
|
||||
|
||||
if !ok {
|
||||
return []string{}
|
||||
}
|
||||
|
||||
for _, u := range users {
|
||||
if m.HasUser(u) {
|
||||
return []string{m.IPv4.String(), m.IPv6.String()}
|
||||
}
|
||||
}
|
||||
|
||||
return []string{}
|
||||
}
|
||||
|
||||
if strings.HasPrefix(alias, "tag:") && m.HasTag(alias[4:]) {
|
||||
return []string{m.IPv4.String(), m.IPv6.String()}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
package domain
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
type AuthMethod struct {
|
||||
ID uint64 `gorm:"primary_key;autoIncrement:false"`
|
||||
Name string `gorm:"type:varchar(64);unique_index"`
|
||||
Type string
|
||||
Issuer string
|
||||
ClientId string
|
||||
ClientSecret string
|
||||
}
|
||||
|
||||
func (r *repository) SaveAuthMethod(ctx context.Context, m *AuthMethod) error {
|
||||
tx := r.withContext(ctx).Save(m)
|
||||
|
||||
if tx.Error != nil {
|
||||
return tx.Error
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (r *repository) ListAuthMethods(ctx context.Context) ([]AuthMethod, error) {
|
||||
var authMethods = []AuthMethod{}
|
||||
tx := r.withContext(ctx).Find(&authMethods)
|
||||
if tx.Error != nil {
|
||||
return nil, tx.Error
|
||||
}
|
||||
return authMethods, nil
|
||||
}
|
||||
|
||||
func (r *repository) GetAuthMethod(ctx context.Context, id uint64) (*AuthMethod, error) {
|
||||
var m AuthMethod
|
||||
tx := r.withContext(ctx).First(&m, "id = ?", id)
|
||||
|
||||
if errors.Is(tx.Error, gorm.ErrRecordNotFound) {
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
if tx.Error != nil {
|
||||
return nil, tx.Error
|
||||
}
|
||||
|
||||
return &m, nil
|
||||
}
|
||||
@@ -61,6 +61,10 @@ func (m *Machine) HasTag(tag string) bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func (m *Machine) HasUser(loginName string) bool {
|
||||
return m.User.Name == loginName
|
||||
}
|
||||
|
||||
func (m *Machine) HasTags() bool {
|
||||
return len(m.Tags) != 0
|
||||
}
|
||||
|
||||
@@ -14,6 +14,13 @@ type Repository interface {
|
||||
GetDERPMap(ctx context.Context) (*tailcfg.DERPMap, error)
|
||||
SetDERPMap(ctx context.Context, v *tailcfg.DERPMap) error
|
||||
|
||||
SaveAuthMethod(ctx context.Context, m *AuthMethod) error
|
||||
ListAuthMethods(ctx context.Context) ([]AuthMethod, error)
|
||||
GetAuthMethod(ctx context.Context, id uint64) (*AuthMethod, error)
|
||||
|
||||
GetAccount(ctx context.Context, accountID uint64) (*Account, error)
|
||||
GetOrCreateAccount(ctx context.Context, authMethodID uint64, externalID, loginName string) (*Account, bool, error)
|
||||
|
||||
GetOrCreateTailnet(ctx context.Context, name string) (*Tailnet, bool, error)
|
||||
GetTailnet(ctx context.Context, id uint64) (*Tailnet, error)
|
||||
ListTailnets(ctx context.Context) ([]Tailnet, error)
|
||||
@@ -35,6 +42,7 @@ type Repository interface {
|
||||
|
||||
GetOrCreateServiceUser(ctx context.Context, tailnet *Tailnet) (*User, bool, error)
|
||||
ListUsers(ctx context.Context, tailnetID uint64) (Users, error)
|
||||
GetOrCreateUserWithAccount(ctx context.Context, tailnet *Tailnet, account *Account) (*User, bool, error)
|
||||
DeleteUsersByTailnet(ctx context.Context, tailnetID uint64) error
|
||||
|
||||
SaveMachine(ctx context.Context, m *Machine) error
|
||||
|
||||
@@ -9,6 +9,7 @@ type TailnetRole string
|
||||
|
||||
const (
|
||||
TailnetRoleService TailnetRole = "service"
|
||||
TailnetRoleMember TailnetRole = "member"
|
||||
)
|
||||
|
||||
type User struct {
|
||||
@@ -18,6 +19,9 @@ type User struct {
|
||||
TailnetRole TailnetRole
|
||||
TailnetID uint64
|
||||
Tailnet Tailnet
|
||||
|
||||
AccountID *uint64
|
||||
Account *Account
|
||||
}
|
||||
|
||||
type Users []User
|
||||
@@ -54,3 +58,19 @@ func (r *repository) DeleteUsersByTailnet(ctx context.Context, tailnetID uint64)
|
||||
tx := r.withContext(ctx).Where("tailnet_id = ?", tailnetID).Delete(&User{})
|
||||
return tx.Error
|
||||
}
|
||||
|
||||
func (r *repository) GetOrCreateUserWithAccount(ctx context.Context, tailnet *Tailnet, account *Account) (*User, bool, error) {
|
||||
user := &User{}
|
||||
id := util.NextID()
|
||||
|
||||
query := User{AccountID: &account.ID, TailnetID: tailnet.ID}
|
||||
attrs := User{ID: id, Name: account.LoginName, TailnetID: tailnet.ID, AccountID: &account.ID, TailnetRole: TailnetRoleMember}
|
||||
|
||||
tx := r.withContext(ctx).Where(query).Attrs(attrs).FirstOrCreate(user)
|
||||
|
||||
if tx.Error != nil {
|
||||
return nil, false, tx.Error
|
||||
}
|
||||
|
||||
return user, user.ID == id, nil
|
||||
}
|
||||
|
||||
@@ -1,8 +1,13 @@
|
||||
package handlers
|
||||
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"github.com/jsiebens/ionscale/internal/addr"
|
||||
"github.com/jsiebens/ionscale/internal/provider"
|
||||
"github.com/mr-tron/base58"
|
||||
"net/http"
|
||||
"strconv"
|
||||
"time"
|
||||
|
||||
"github.com/jsiebens/ionscale/internal/config"
|
||||
@@ -21,6 +26,7 @@ func NewAuthenticationHandlers(
|
||||
config: config,
|
||||
repository: repository,
|
||||
pendingMachineRegistrationRequests: pendingMachineRegistrationRequests,
|
||||
pendingOAuthUsers: cache.New(5*time.Minute, 10*time.Minute),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,21 +34,118 @@ type AuthenticationHandlers struct {
|
||||
repository domain.Repository
|
||||
config *config.Config
|
||||
pendingMachineRegistrationRequests *cache.Cache
|
||||
pendingOAuthUsers *cache.Cache
|
||||
}
|
||||
|
||||
type AuthFormData struct {
|
||||
AuthMethods []domain.AuthMethod
|
||||
}
|
||||
|
||||
type TailnetSelectionData struct {
|
||||
Tailnets []domain.Tailnet
|
||||
}
|
||||
|
||||
type oauthState struct {
|
||||
Key string
|
||||
AuthMethod uint64
|
||||
}
|
||||
|
||||
func (h *AuthenticationHandlers) StartAuth(c echo.Context) error {
|
||||
ctx := c.Request().Context()
|
||||
key := c.Param("key")
|
||||
|
||||
if _, ok := h.pendingMachineRegistrationRequests.Get(key); !ok {
|
||||
return c.Redirect(http.StatusFound, "/a/error")
|
||||
}
|
||||
|
||||
methods, err := h.repository.ListAuthMethods(ctx)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return c.Render(http.StatusOK, "auth.html", &AuthFormData{AuthMethods: methods})
|
||||
}
|
||||
|
||||
func (h *AuthenticationHandlers) ProcessAuth(c echo.Context) error {
|
||||
ctx := c.Request().Context()
|
||||
|
||||
key := c.Param("key")
|
||||
authKey := c.FormValue("ak")
|
||||
authMethodId := c.FormValue("s")
|
||||
|
||||
if _, ok := h.pendingMachineRegistrationRequests.Get(key); !ok {
|
||||
return c.Redirect(http.StatusFound, "/a/error")
|
||||
}
|
||||
|
||||
if authKey != "" {
|
||||
return h.endMachineRegistrationFlow(c, key, authKey)
|
||||
return h.endMachineRegistrationFlow(c, &oauthState{Key: key})
|
||||
}
|
||||
|
||||
return c.Render(http.StatusOK, "auth.html", nil)
|
||||
if authMethodId != "" {
|
||||
id, err := strconv.ParseUint(authMethodId, 10, 64)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
method, err := h.repository.GetAuthMethod(ctx, id)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
state, err := h.createState(key, method.ID)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
authProvider, err := provider.NewProvider(method)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
redirectUrl := authProvider.GetLoginURL(h.config.CreateUrl("/a/callback"), state)
|
||||
|
||||
return c.Redirect(http.StatusFound, redirectUrl)
|
||||
}
|
||||
|
||||
return c.Redirect(http.StatusFound, "/a/"+key)
|
||||
}
|
||||
|
||||
func (h *AuthenticationHandlers) Callback(c echo.Context) error {
|
||||
ctx := c.Request().Context()
|
||||
|
||||
code := c.QueryParam("code")
|
||||
state, err := h.readState(c.QueryParam("state"))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
user, err := h.exchangeUser(ctx, code, state)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
tailnets, err := h.repository.ListTailnets(ctx)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
account, _, err := h.repository.GetOrCreateAccount(ctx, state.AuthMethod, user.ID, user.Name)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
h.pendingOAuthUsers.Set(state.Key, account, cache.DefaultExpiration)
|
||||
|
||||
return c.Render(http.StatusOK, "tailnets.html", &TailnetSelectionData{Tailnets: tailnets})
|
||||
}
|
||||
|
||||
func (h *AuthenticationHandlers) EndOAuth(c echo.Context) error {
|
||||
state, err := h.readState(c.QueryParam("state"))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return h.endMachineRegistrationFlow(c, state)
|
||||
}
|
||||
|
||||
func (h *AuthenticationHandlers) Success(c echo.Context) error {
|
||||
@@ -58,21 +161,30 @@ func (h *AuthenticationHandlers) Error(c echo.Context) error {
|
||||
return c.Render(http.StatusOK, "error.html", nil)
|
||||
}
|
||||
|
||||
func (h *AuthenticationHandlers) endMachineRegistrationFlow(c echo.Context, registrationKey, authKeyParam string) error {
|
||||
func (h *AuthenticationHandlers) endMachineRegistrationFlow(c echo.Context, state *oauthState) error {
|
||||
ctx := c.Request().Context()
|
||||
|
||||
defer h.pendingMachineRegistrationRequests.Delete(registrationKey)
|
||||
defer h.pendingMachineRegistrationRequests.Delete(state.Key)
|
||||
|
||||
preqItem, preqOK := h.pendingMachineRegistrationRequests.Get(registrationKey)
|
||||
preqItem, preqOK := h.pendingMachineRegistrationRequests.Get(state.Key)
|
||||
if !preqOK {
|
||||
return c.Redirect(http.StatusFound, "/a/error")
|
||||
}
|
||||
|
||||
authKeyParam := c.FormValue("ak")
|
||||
tailnetIDParam := c.FormValue("s")
|
||||
|
||||
preq := preqItem.(*pendingMachineRegistrationRequest)
|
||||
req := preq.request
|
||||
machineKey := preq.machineKey
|
||||
nodeKey := req.NodeKey.String()
|
||||
|
||||
var tailnet *domain.Tailnet
|
||||
var user *domain.User
|
||||
var ephemeral bool
|
||||
var tags = []string{}
|
||||
|
||||
if authKeyParam != "" {
|
||||
authKey, err := h.repository.LoadAuthKey(ctx, authKeyParam)
|
||||
if err != nil {
|
||||
return err
|
||||
@@ -82,12 +194,38 @@ func (h *AuthenticationHandlers) endMachineRegistrationFlow(c echo.Context, regi
|
||||
return c.Redirect(http.StatusFound, "/a/error?e=iak")
|
||||
}
|
||||
|
||||
tailnet := authKey.Tailnet
|
||||
user := authKey.User
|
||||
tailnet = &authKey.Tailnet
|
||||
user = &authKey.User
|
||||
tags = authKey.Tags
|
||||
ephemeral = authKey.Ephemeral
|
||||
} else {
|
||||
parseUint, err := strconv.ParseUint(tailnetIDParam, 10, 64)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
tailnet, err = h.repository.GetTailnet(ctx, parseUint)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
item, ok := h.pendingOAuthUsers.Get(state.Key)
|
||||
if !ok {
|
||||
return c.Redirect(http.StatusFound, "/a/error")
|
||||
}
|
||||
|
||||
oa := item.(*domain.Account)
|
||||
|
||||
user, _, err = h.repository.GetOrCreateUserWithAccount(ctx, tailnet, oa)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
ephemeral = false
|
||||
}
|
||||
|
||||
var m *domain.Machine
|
||||
|
||||
m, err = h.repository.GetMachineByKey(ctx, tailnet.ID, machineKey)
|
||||
m, err := h.repository.GetMachineByKey(ctx, tailnet.ID, machineKey)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -95,10 +233,17 @@ func (h *AuthenticationHandlers) endMachineRegistrationFlow(c echo.Context, regi
|
||||
if m == nil {
|
||||
now := time.Now().UTC()
|
||||
|
||||
registeredTags := authKey.Tags
|
||||
registeredTags := tags
|
||||
advertisedTags := domain.SanitizeTags(req.Hostinfo.RequestTags)
|
||||
tags := append(registeredTags, advertisedTags...)
|
||||
|
||||
if len(tags) != 0 {
|
||||
user, _, err = h.repository.GetOrCreateServiceUser(ctx, tailnet)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
sanitizeHostname := dnsname.SanitizeHostname(req.Hostinfo.Hostname)
|
||||
nameIdx, err := h.repository.GetNextMachineNameIndex(ctx, tailnet.ID, sanitizeHostname)
|
||||
if err != nil {
|
||||
@@ -111,13 +256,13 @@ func (h *AuthenticationHandlers) endMachineRegistrationFlow(c echo.Context, regi
|
||||
NameIdx: nameIdx,
|
||||
MachineKey: machineKey,
|
||||
NodeKey: nodeKey,
|
||||
Ephemeral: authKey.Ephemeral,
|
||||
Ephemeral: ephemeral,
|
||||
RegisteredTags: registeredTags,
|
||||
Tags: domain.SanitizeTags(tags),
|
||||
CreatedAt: now,
|
||||
|
||||
User: user,
|
||||
Tailnet: tailnet,
|
||||
User: *user,
|
||||
Tailnet: *tailnet,
|
||||
}
|
||||
|
||||
if !req.Expiry.IsZero() {
|
||||
@@ -131,10 +276,17 @@ func (h *AuthenticationHandlers) endMachineRegistrationFlow(c echo.Context, regi
|
||||
m.IPv4 = domain.IP{IP: ipv4}
|
||||
m.IPv6 = domain.IP{IP: ipv6}
|
||||
} else {
|
||||
registeredTags := authKey.Tags
|
||||
registeredTags := tags
|
||||
advertisedTags := domain.SanitizeTags(req.Hostinfo.RequestTags)
|
||||
tags := append(registeredTags, advertisedTags...)
|
||||
|
||||
if len(tags) != 0 {
|
||||
user, _, err = h.repository.GetOrCreateServiceUser(ctx, tailnet)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
sanitizeHostname := dnsname.SanitizeHostname(req.Hostinfo.Hostname)
|
||||
if m.Name != sanitizeHostname {
|
||||
nameIdx, err := h.repository.GetNextMachineNameIndex(ctx, tailnet.ID, sanitizeHostname)
|
||||
@@ -145,13 +297,13 @@ func (h *AuthenticationHandlers) endMachineRegistrationFlow(c echo.Context, regi
|
||||
m.NameIdx = nameIdx
|
||||
}
|
||||
m.NodeKey = nodeKey
|
||||
m.Ephemeral = authKey.Ephemeral
|
||||
m.Ephemeral = ephemeral
|
||||
m.RegisteredTags = registeredTags
|
||||
m.Tags = domain.SanitizeTags(tags)
|
||||
m.UserID = user.ID
|
||||
m.User = user
|
||||
m.User = *user
|
||||
m.TailnetID = tailnet.ID
|
||||
m.Tailnet = tailnet
|
||||
m.Tailnet = *tailnet
|
||||
m.ExpiresAt = nil
|
||||
}
|
||||
|
||||
@@ -161,3 +313,49 @@ func (h *AuthenticationHandlers) endMachineRegistrationFlow(c echo.Context, regi
|
||||
|
||||
return c.Redirect(http.StatusFound, "/a/success")
|
||||
}
|
||||
|
||||
func (h *AuthenticationHandlers) getAuthProvider(ctx context.Context, authMethodId uint64) (provider.AuthProvider, error) {
|
||||
authMethod, err := h.repository.GetAuthMethod(ctx, authMethodId)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return provider.NewProvider(authMethod)
|
||||
}
|
||||
|
||||
func (h *AuthenticationHandlers) exchangeUser(ctx context.Context, code string, state *oauthState) (*provider.User, error) {
|
||||
redirectUrl := h.config.CreateUrl("/a/callback")
|
||||
|
||||
authProvider, err := h.getAuthProvider(ctx, state.AuthMethod)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
user, err := authProvider.Exchange(redirectUrl, code)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return user, nil
|
||||
}
|
||||
|
||||
func (h *AuthenticationHandlers) createState(key string, authMethodId uint64) (string, error) {
|
||||
stateMap := oauthState{Key: key, AuthMethod: authMethodId}
|
||||
marshal, err := json.Marshal(&stateMap)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
return base58.FastBase58Encoding(marshal), nil
|
||||
}
|
||||
|
||||
func (h *AuthenticationHandlers) readState(s string) (*oauthState, error) {
|
||||
decodedState, err := base58.FastBase58Decoding(s)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
var state = &oauthState{}
|
||||
if err := json.Unmarshal(decodedState, state); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return state, nil
|
||||
}
|
||||
|
||||
@@ -0,0 +1,130 @@
|
||||
package provider
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"github.com/coreos/go-oidc/v3/oidc"
|
||||
"github.com/jsiebens/ionscale/internal/domain"
|
||||
"golang.org/x/oauth2"
|
||||
)
|
||||
|
||||
type OIDCProvider struct {
|
||||
clientID string
|
||||
clientSecret string
|
||||
provider *oidc.Provider
|
||||
verifier *oidc.IDTokenVerifier
|
||||
}
|
||||
|
||||
func NewOIDCProvider(c *domain.AuthMethod) (*OIDCProvider, error) {
|
||||
provider, err := oidc.NewProvider(context.Background(), c.Issuer)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
verifier := provider.Verifier(&oidc.Config{ClientID: c.ClientId})
|
||||
|
||||
return &OIDCProvider{
|
||||
clientID: c.ClientId,
|
||||
clientSecret: c.ClientSecret,
|
||||
provider: provider,
|
||||
verifier: verifier,
|
||||
}, nil
|
||||
}
|
||||
|
||||
func (p *OIDCProvider) GetLoginURL(redirectURI, state string) string {
|
||||
oauth2Config := oauth2.Config{
|
||||
ClientID: p.clientID,
|
||||
ClientSecret: p.clientSecret,
|
||||
RedirectURL: redirectURI,
|
||||
Endpoint: p.provider.Endpoint(),
|
||||
Scopes: []string{oidc.ScopeOpenID, "profile", "email"},
|
||||
}
|
||||
|
||||
return oauth2Config.AuthCodeURL(state, oauth2.ApprovalForce)
|
||||
}
|
||||
|
||||
func (p *OIDCProvider) Exchange(redirectURI, code string) (*User, error) {
|
||||
oauth2Config := oauth2.Config{
|
||||
ClientID: p.clientID,
|
||||
ClientSecret: p.clientSecret,
|
||||
RedirectURL: redirectURI,
|
||||
Endpoint: p.provider.Endpoint(),
|
||||
Scopes: []string{oidc.ScopeOpenID, "profile", "email"},
|
||||
}
|
||||
|
||||
oauth2Token, err := oauth2Config.Exchange(context.Background(), code)
|
||||
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// Extract the ID Token from OAuth2 token.
|
||||
rawIdToken, ok := oauth2Token.Extra("id_token").(string)
|
||||
if !ok || strings.TrimSpace(rawIdToken) == "" {
|
||||
return nil, fmt.Errorf("id_token missing")
|
||||
}
|
||||
|
||||
// Parse and verify ID Token payload.
|
||||
idToken, err := p.verifier.Verify(context.Background(), rawIdToken)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
sub, email, tokenClaims, err := p.getTokenClaims(idToken)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
userInfoClaims, err := p.getUserInfoClaims(oauth2Config, oauth2Token)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return &User{
|
||||
ID: sub,
|
||||
Name: email,
|
||||
Attr: map[string]interface{}{
|
||||
"token": tokenClaims,
|
||||
"userinfo": userInfoClaims,
|
||||
},
|
||||
}, nil
|
||||
}
|
||||
|
||||
func (p *OIDCProvider) getTokenClaims(idToken *oidc.IDToken) (string, string, map[string]interface{}, error) {
|
||||
var raw = make(map[string]interface{})
|
||||
var claims struct {
|
||||
Sub string `json:"sub"`
|
||||
Email string `json:"email"`
|
||||
}
|
||||
|
||||
// Extract default claims.
|
||||
if err := idToken.Claims(&claims); err != nil {
|
||||
return "", "", nil, fmt.Errorf("failed to parse id_token claims: %v", err)
|
||||
}
|
||||
|
||||
// Extract raw claims.
|
||||
if err := idToken.Claims(&raw); err != nil {
|
||||
return "", "", nil, fmt.Errorf("failed to parse id_token claims: %v", err)
|
||||
}
|
||||
|
||||
return claims.Sub, claims.Email, raw, nil
|
||||
}
|
||||
|
||||
func (p *OIDCProvider) getUserInfoClaims(config oauth2.Config, token *oauth2.Token) (map[string]interface{}, error) {
|
||||
var raw = make(map[string]interface{})
|
||||
|
||||
source := config.TokenSource(context.Background(), token)
|
||||
|
||||
info, err := p.provider.UserInfo(context.Background(), source)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if err := info.Claims(&raw); err != nil {
|
||||
return nil, fmt.Errorf("failed to parse user info claims: %v", err)
|
||||
}
|
||||
|
||||
return raw, nil
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package provider
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/jsiebens/ionscale/internal/domain"
|
||||
)
|
||||
|
||||
type AuthProvider interface {
|
||||
GetLoginURL(redirectURI, state string) string
|
||||
Exchange(redirectURI, code string) (*User, error)
|
||||
}
|
||||
|
||||
type User struct {
|
||||
ID string
|
||||
Name string
|
||||
Attr map[string]interface{}
|
||||
}
|
||||
|
||||
func NewProvider(m *domain.AuthMethod) (AuthProvider, error) {
|
||||
switch m.Type {
|
||||
case "oidc":
|
||||
return NewOIDCProvider(m)
|
||||
default:
|
||||
return nil, fmt.Errorf("unknown auth method type")
|
||||
}
|
||||
}
|
||||
@@ -130,7 +130,9 @@ func Start(config *config.Config) error {
|
||||
|
||||
auth := tlsAppHandler.Group("/a")
|
||||
auth.GET("/:key", authenticationHandlers.StartAuth)
|
||||
auth.POST("/:key", authenticationHandlers.StartAuth)
|
||||
auth.POST("/:key", authenticationHandlers.ProcessAuth)
|
||||
auth.GET("/callback", authenticationHandlers.Callback)
|
||||
auth.POST("/callback", authenticationHandlers.EndOAuth)
|
||||
auth.GET("/success", authenticationHandlers.Success)
|
||||
auth.GET("/error", authenticationHandlers.Error)
|
||||
|
||||
|
||||
@@ -2,8 +2,8 @@ package service
|
||||
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"github.com/jsiebens/ionscale/internal/domain"
|
||||
"github.com/jsiebens/ionscale/internal/mapping"
|
||||
"github.com/jsiebens/ionscale/pkg/gen/api"
|
||||
"google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/status"
|
||||
@@ -15,12 +15,12 @@ func (s *Service) GetACLPolicy(ctx context.Context, req *api.GetACLPolicyRequest
|
||||
return nil, err
|
||||
}
|
||||
|
||||
var p api.Policy
|
||||
if err := mapping.CopyViaJson(policy, &p); err != nil {
|
||||
marshal, err := json.Marshal(policy)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return &api.GetACLPolicyResponse{Policy: &p}, nil
|
||||
return &api.GetACLPolicyResponse{Value: marshal}, nil
|
||||
}
|
||||
|
||||
func (s *Service) SetACLPolicy(ctx context.Context, req *api.SetACLPolicyRequest) (*api.SetACLPolicyResponse, error) {
|
||||
@@ -33,7 +33,7 @@ func (s *Service) SetACLPolicy(ctx context.Context, req *api.SetACLPolicyRequest
|
||||
}
|
||||
|
||||
var policy domain.ACLPolicy
|
||||
if err := mapping.CopyViaJson(req.Policy, &policy); err != nil {
|
||||
if err := json.Unmarshal(req.Value, &policy); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
package service
|
||||
|
||||
import (
|
||||
"context"
|
||||
"github.com/jsiebens/ionscale/internal/domain"
|
||||
"github.com/jsiebens/ionscale/internal/util"
|
||||
"github.com/jsiebens/ionscale/pkg/gen/api"
|
||||
)
|
||||
|
||||
func (s *Service) CreateAuthMethod(ctx context.Context, req *api.CreateAuthMethodRequest) (*api.CreateAuthMethodResponse, error) {
|
||||
|
||||
authMethod := &domain.AuthMethod{
|
||||
ID: util.NextID(),
|
||||
Name: req.Name,
|
||||
Type: req.Type,
|
||||
Issuer: req.Issuer,
|
||||
ClientId: req.ClientId,
|
||||
ClientSecret: req.ClientSecret,
|
||||
}
|
||||
|
||||
if err := s.repository.SaveAuthMethod(ctx, authMethod); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return &api.CreateAuthMethodResponse{AuthMethod: &api.AuthMethod{
|
||||
Id: authMethod.ID,
|
||||
Type: authMethod.Type,
|
||||
Name: authMethod.Name,
|
||||
Issuer: authMethod.Issuer,
|
||||
ClientId: authMethod.ClientId,
|
||||
}}, nil
|
||||
|
||||
}
|
||||
|
||||
func (s *Service) ListAuthMethods(ctx context.Context, _ *api.ListAuthMethodsRequest) (*api.ListAuthMethodsResponse, error) {
|
||||
methods, err := s.repository.ListAuthMethods(ctx)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
response := &api.ListAuthMethodsResponse{AuthMethods: []*api.AuthMethod{}}
|
||||
for _, m := range methods {
|
||||
response.AuthMethods = append(response.AuthMethods, &api.AuthMethod{
|
||||
Id: m.ID,
|
||||
Name: m.Name,
|
||||
Type: m.Type,
|
||||
})
|
||||
}
|
||||
|
||||
return response, nil
|
||||
}
|
||||
@@ -74,10 +74,28 @@
|
||||
</head>
|
||||
<body>
|
||||
<div class="wrapper">
|
||||
{{if .AuthMethods}}
|
||||
<div style="text-align: left; padding-bottom: 10px">
|
||||
<p><b>Authentication required</b></p>
|
||||
<small>Login with:</small>
|
||||
</div>
|
||||
<form method="post">
|
||||
<ul class="selectionList">
|
||||
{{range .AuthMethods}}
|
||||
<li><button type="submit" name="s" value="{{.ID}}">{{.Name}}</button></li>
|
||||
{{end}}
|
||||
</ul>
|
||||
</form>
|
||||
<div style="text-align: left; padding-bottom: 10px; padding-top: 20px">
|
||||
<small>Or enter an <label for="ak">auth key</label> here:</small>
|
||||
</div>
|
||||
{{end}}
|
||||
{{if not .AuthMethods}}
|
||||
<div style="text-align: left; padding-bottom: 10px">
|
||||
<p><b>Authentication required</b></p>
|
||||
<small>Enter an <label for="ak">auth key</label> here:</small>
|
||||
</div>
|
||||
{{end}}
|
||||
<form method="post" style="text-align: right">
|
||||
<p><input id="ak" name="ak" type="text"/></p>
|
||||
<div style="padding-top: 10px">
|
||||
|
||||
@@ -0,0 +1,90 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<style>
|
||||
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@200;300;400;500;600;700&display=swap');
|
||||
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
box-sizing: border-box;
|
||||
font-family: 'Poppins', sans-serif;
|
||||
}
|
||||
|
||||
body {
|
||||
width: 100%;
|
||||
height: 100vh;
|
||||
padding: 10px;
|
||||
background: #379683;
|
||||
}
|
||||
|
||||
.wrapper {
|
||||
background: #fff;
|
||||
max-width: 400px;
|
||||
width: 100%;
|
||||
margin: 120px auto;
|
||||
padding: 25px;
|
||||
border-radius: 5px;
|
||||
box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
.selectionList li {
|
||||
position: relative;
|
||||
list-style: none;
|
||||
height: 45px;
|
||||
line-height: 45px;
|
||||
margin-bottom: 8px;
|
||||
background: #f2f2f2;
|
||||
border-radius: 3px;
|
||||
overflow: hidden;
|
||||
box-shadow: 0 2px 2px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
.selectionList {
|
||||
padding-top: 5px
|
||||
}
|
||||
|
||||
.selectionList li button {
|
||||
margin: 0;
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border: none;
|
||||
}
|
||||
|
||||
input {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
button {
|
||||
padding-top: 10px;
|
||||
padding-bottom: 10px;
|
||||
padding-left: 20px;
|
||||
padding-right: 20px;
|
||||
height: 45px;
|
||||
border: none;
|
||||
}
|
||||
</style>
|
||||
<title>ionscale</title>
|
||||
</head>
|
||||
<body>
|
||||
<div class="wrapper">
|
||||
<div style="text-align: left; padding-bottom: 10px">
|
||||
<p><b>Tailnets</b></p>
|
||||
<small>Select your tailnet:</small>
|
||||
</div>
|
||||
<form method="post">
|
||||
<ul class="selectionList">
|
||||
{{range .Tailnets}}
|
||||
<li><button type="submit" name="s" value="{{.ID}}">{{.Name}}</button></li>
|
||||
{{end}}
|
||||
</ul>
|
||||
</form>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
+25
-190
@@ -74,7 +74,7 @@ type GetACLPolicyResponse struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Policy *Policy `protobuf:"bytes,1,opt,name=policy,proto3" json:"policy,omitempty"`
|
||||
Value []byte `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
|
||||
}
|
||||
|
||||
func (x *GetACLPolicyResponse) Reset() {
|
||||
@@ -109,9 +109,9 @@ func (*GetACLPolicyResponse) Descriptor() ([]byte, []int) {
|
||||
return file_api_acl_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *GetACLPolicyResponse) GetPolicy() *Policy {
|
||||
func (x *GetACLPolicyResponse) GetValue() []byte {
|
||||
if x != nil {
|
||||
return x.Policy
|
||||
return x.Value
|
||||
}
|
||||
return nil
|
||||
}
|
||||
@@ -122,7 +122,7 @@ type SetACLPolicyRequest struct {
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
TailnetId uint64 `protobuf:"varint,1,opt,name=tailnet_id,json=tailnetId,proto3" json:"tailnet_id,omitempty"`
|
||||
Policy *Policy `protobuf:"bytes,2,opt,name=policy,proto3" json:"policy,omitempty"`
|
||||
Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
|
||||
}
|
||||
|
||||
func (x *SetACLPolicyRequest) Reset() {
|
||||
@@ -164,9 +164,9 @@ func (x *SetACLPolicyRequest) GetTailnetId() uint64 {
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *SetACLPolicyRequest) GetPolicy() *Policy {
|
||||
func (x *SetACLPolicyRequest) GetValue() []byte {
|
||||
if x != nil {
|
||||
return x.Policy
|
||||
return x.Value
|
||||
}
|
||||
return nil
|
||||
}
|
||||
@@ -209,124 +209,6 @@ func (*SetACLPolicyResponse) Descriptor() ([]byte, []int) {
|
||||
return file_api_acl_proto_rawDescGZIP(), []int{3}
|
||||
}
|
||||
|
||||
type Policy struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Hosts map[string]string `protobuf:"bytes,1,rep,name=hosts,proto3" json:"hosts,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
|
||||
Acls []*ACL `protobuf:"bytes,2,rep,name=acls,proto3" json:"acls,omitempty"`
|
||||
}
|
||||
|
||||
func (x *Policy) Reset() {
|
||||
*x = Policy{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_acl_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *Policy) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*Policy) ProtoMessage() {}
|
||||
|
||||
func (x *Policy) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_acl_proto_msgTypes[4]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use Policy.ProtoReflect.Descriptor instead.
|
||||
func (*Policy) Descriptor() ([]byte, []int) {
|
||||
return file_api_acl_proto_rawDescGZIP(), []int{4}
|
||||
}
|
||||
|
||||
func (x *Policy) GetHosts() map[string]string {
|
||||
if x != nil {
|
||||
return x.Hosts
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *Policy) GetAcls() []*ACL {
|
||||
if x != nil {
|
||||
return x.Acls
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type ACL struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Action string `protobuf:"bytes,1,opt,name=action,proto3" json:"action,omitempty"`
|
||||
Src []string `protobuf:"bytes,2,rep,name=src,proto3" json:"src,omitempty"`
|
||||
Dst []string `protobuf:"bytes,3,rep,name=dst,proto3" json:"dst,omitempty"`
|
||||
}
|
||||
|
||||
func (x *ACL) Reset() {
|
||||
*x = ACL{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_acl_proto_msgTypes[5]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *ACL) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ACL) ProtoMessage() {}
|
||||
|
||||
func (x *ACL) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_acl_proto_msgTypes[5]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use ACL.ProtoReflect.Descriptor instead.
|
||||
func (*ACL) Descriptor() ([]byte, []int) {
|
||||
return file_api_acl_proto_rawDescGZIP(), []int{5}
|
||||
}
|
||||
|
||||
func (x *ACL) GetAction() string {
|
||||
if x != nil {
|
||||
return x.Action
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *ACL) GetSrc() []string {
|
||||
if x != nil {
|
||||
return x.Src
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *ACL) GetDst() []string {
|
||||
if x != nil {
|
||||
return x.Dst
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
var File_api_acl_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_api_acl_proto_rawDesc = []byte{
|
||||
@@ -339,35 +221,19 @@ var file_api_acl_proto_rawDesc = []byte{
|
||||
0x72, 0x6f, 0x74, 0x6f, 0x22, 0x34, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x41, 0x43, 0x4c, 0x50, 0x6f,
|
||||
0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x74,
|
||||
0x61, 0x69, 0x6c, 0x6e, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52,
|
||||
0x09, 0x74, 0x61, 0x69, 0x6c, 0x6e, 0x65, 0x74, 0x49, 0x64, 0x22, 0x3b, 0x0a, 0x14, 0x47, 0x65,
|
||||
0x09, 0x74, 0x61, 0x69, 0x6c, 0x6e, 0x65, 0x74, 0x49, 0x64, 0x22, 0x2c, 0x0a, 0x14, 0x47, 0x65,
|
||||
0x74, 0x41, 0x43, 0x4c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
|
||||
0x73, 0x65, 0x12, 0x23, 0x0a, 0x06, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x01, 0x20, 0x01,
|
||||
0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52,
|
||||
0x06, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x22, 0x59, 0x0a, 0x13, 0x53, 0x65, 0x74, 0x41, 0x43,
|
||||
0x4c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d,
|
||||
0x0a, 0x0a, 0x74, 0x61, 0x69, 0x6c, 0x6e, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01,
|
||||
0x28, 0x04, 0x52, 0x09, 0x74, 0x61, 0x69, 0x6c, 0x6e, 0x65, 0x74, 0x49, 0x64, 0x12, 0x23, 0x0a,
|
||||
0x06, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e,
|
||||
0x61, 0x70, 0x69, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x06, 0x70, 0x6f, 0x6c, 0x69,
|
||||
0x63, 0x79, 0x22, 0x16, 0x0a, 0x14, 0x53, 0x65, 0x74, 0x41, 0x43, 0x4c, 0x50, 0x6f, 0x6c, 0x69,
|
||||
0x63, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x8e, 0x01, 0x0a, 0x06, 0x50,
|
||||
0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x2c, 0x0a, 0x05, 0x68, 0x6f, 0x73, 0x74, 0x73, 0x18, 0x01,
|
||||
0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63,
|
||||
0x79, 0x2e, 0x48, 0x6f, 0x73, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x68, 0x6f,
|
||||
0x73, 0x74, 0x73, 0x12, 0x1c, 0x0a, 0x04, 0x61, 0x63, 0x6c, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28,
|
||||
0x0b, 0x32, 0x08, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x41, 0x43, 0x4c, 0x52, 0x04, 0x61, 0x63, 0x6c,
|
||||
0x73, 0x1a, 0x38, 0x0a, 0x0a, 0x48, 0x6f, 0x73, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12,
|
||||
0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65,
|
||||
0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x41, 0x0a, 0x03, 0x41,
|
||||
0x43, 0x4c, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x72,
|
||||
0x63, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x03, 0x73, 0x72, 0x63, 0x12, 0x10, 0x0a, 0x03,
|
||||
0x64, 0x73, 0x74, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x03, 0x64, 0x73, 0x74, 0x42, 0x2a,
|
||||
0x5a, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6a, 0x73, 0x69,
|
||||
0x65, 0x62, 0x65, 0x6e, 0x73, 0x2f, 0x69, 0x6f, 0x6e, 0x73, 0x63, 0x61, 0x6c, 0x65, 0x2f, 0x70,
|
||||
0x6b, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x3b, 0x61, 0x70, 0x69, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
|
||||
0x6f, 0x33,
|
||||
0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x0c, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x4a, 0x0a, 0x13, 0x53, 0x65, 0x74, 0x41,
|
||||
0x43, 0x4c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
|
||||
0x1d, 0x0a, 0x0a, 0x74, 0x61, 0x69, 0x6c, 0x6e, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20,
|
||||
0x01, 0x28, 0x04, 0x52, 0x09, 0x74, 0x61, 0x69, 0x6c, 0x6e, 0x65, 0x74, 0x49, 0x64, 0x12, 0x14,
|
||||
0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x76,
|
||||
0x61, 0x6c, 0x75, 0x65, 0x22, 0x16, 0x0a, 0x14, 0x53, 0x65, 0x74, 0x41, 0x43, 0x4c, 0x50, 0x6f,
|
||||
0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x2a, 0x5a, 0x28,
|
||||
0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6a, 0x73, 0x69, 0x65, 0x62,
|
||||
0x65, 0x6e, 0x73, 0x2f, 0x69, 0x6f, 0x6e, 0x73, 0x63, 0x61, 0x6c, 0x65, 0x2f, 0x70, 0x6b, 0x67,
|
||||
0x2f, 0x67, 0x65, 0x6e, 0x3b, 0x61, 0x70, 0x69, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
@@ -382,26 +248,19 @@ func file_api_acl_proto_rawDescGZIP() []byte {
|
||||
return file_api_acl_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_api_acl_proto_msgTypes = make([]protoimpl.MessageInfo, 7)
|
||||
var file_api_acl_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
|
||||
var file_api_acl_proto_goTypes = []interface{}{
|
||||
(*GetACLPolicyRequest)(nil), // 0: api.GetACLPolicyRequest
|
||||
(*GetACLPolicyResponse)(nil), // 1: api.GetACLPolicyResponse
|
||||
(*SetACLPolicyRequest)(nil), // 2: api.SetACLPolicyRequest
|
||||
(*SetACLPolicyResponse)(nil), // 3: api.SetACLPolicyResponse
|
||||
(*Policy)(nil), // 4: api.Policy
|
||||
(*ACL)(nil), // 5: api.ACL
|
||||
nil, // 6: api.Policy.HostsEntry
|
||||
}
|
||||
var file_api_acl_proto_depIdxs = []int32{
|
||||
4, // 0: api.GetACLPolicyResponse.policy:type_name -> api.Policy
|
||||
4, // 1: api.SetACLPolicyRequest.policy:type_name -> api.Policy
|
||||
6, // 2: api.Policy.hosts:type_name -> api.Policy.HostsEntry
|
||||
5, // 3: api.Policy.acls:type_name -> api.ACL
|
||||
4, // [4:4] is the sub-list for method output_type
|
||||
4, // [4:4] is the sub-list for method input_type
|
||||
4, // [4:4] is the sub-list for extension type_name
|
||||
4, // [4:4] is the sub-list for extension extendee
|
||||
0, // [0:4] is the sub-list for field type_name
|
||||
0, // [0:0] is the sub-list for method output_type
|
||||
0, // [0:0] is the sub-list for method input_type
|
||||
0, // [0:0] is the sub-list for extension type_name
|
||||
0, // [0:0] is the sub-list for extension extendee
|
||||
0, // [0:0] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_api_acl_proto_init() }
|
||||
@@ -459,30 +318,6 @@ func file_api_acl_proto_init() {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_api_acl_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*Policy); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_api_acl_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ACL); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
@@ -490,7 +325,7 @@ func file_api_acl_proto_init() {
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_api_acl_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 7,
|
||||
NumMessages: 4,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
|
||||
@@ -0,0 +1,468 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.27.1
|
||||
// protoc v3.17.3
|
||||
// source: api/auth_methods.proto
|
||||
|
||||
package api
|
||||
|
||||
import (
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
)
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
type AuthMethod struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`
|
||||
Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
|
||||
Issuer string `protobuf:"bytes,4,opt,name=issuer,proto3" json:"issuer,omitempty"`
|
||||
ClientId string `protobuf:"bytes,5,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"`
|
||||
}
|
||||
|
||||
func (x *AuthMethod) Reset() {
|
||||
*x = AuthMethod{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_auth_methods_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *AuthMethod) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*AuthMethod) ProtoMessage() {}
|
||||
|
||||
func (x *AuthMethod) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_auth_methods_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use AuthMethod.ProtoReflect.Descriptor instead.
|
||||
func (*AuthMethod) Descriptor() ([]byte, []int) {
|
||||
return file_api_auth_methods_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *AuthMethod) GetId() uint64 {
|
||||
if x != nil {
|
||||
return x.Id
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *AuthMethod) GetType() string {
|
||||
if x != nil {
|
||||
return x.Type
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *AuthMethod) GetName() string {
|
||||
if x != nil {
|
||||
return x.Name
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *AuthMethod) GetIssuer() string {
|
||||
if x != nil {
|
||||
return x.Issuer
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *AuthMethod) GetClientId() string {
|
||||
if x != nil {
|
||||
return x.ClientId
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type CreateAuthMethodRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
|
||||
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
|
||||
Issuer string `protobuf:"bytes,3,opt,name=issuer,proto3" json:"issuer,omitempty"`
|
||||
ClientId string `protobuf:"bytes,4,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"`
|
||||
ClientSecret string `protobuf:"bytes,5,opt,name=client_secret,json=clientSecret,proto3" json:"client_secret,omitempty"`
|
||||
}
|
||||
|
||||
func (x *CreateAuthMethodRequest) Reset() {
|
||||
*x = CreateAuthMethodRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_auth_methods_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *CreateAuthMethodRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*CreateAuthMethodRequest) ProtoMessage() {}
|
||||
|
||||
func (x *CreateAuthMethodRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_auth_methods_proto_msgTypes[1]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use CreateAuthMethodRequest.ProtoReflect.Descriptor instead.
|
||||
func (*CreateAuthMethodRequest) Descriptor() ([]byte, []int) {
|
||||
return file_api_auth_methods_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *CreateAuthMethodRequest) GetType() string {
|
||||
if x != nil {
|
||||
return x.Type
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *CreateAuthMethodRequest) GetName() string {
|
||||
if x != nil {
|
||||
return x.Name
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *CreateAuthMethodRequest) GetIssuer() string {
|
||||
if x != nil {
|
||||
return x.Issuer
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *CreateAuthMethodRequest) GetClientId() string {
|
||||
if x != nil {
|
||||
return x.ClientId
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *CreateAuthMethodRequest) GetClientSecret() string {
|
||||
if x != nil {
|
||||
return x.ClientSecret
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type CreateAuthMethodResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
AuthMethod *AuthMethod `protobuf:"bytes,1,opt,name=auth_method,json=authMethod,proto3" json:"auth_method,omitempty"`
|
||||
}
|
||||
|
||||
func (x *CreateAuthMethodResponse) Reset() {
|
||||
*x = CreateAuthMethodResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_auth_methods_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *CreateAuthMethodResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*CreateAuthMethodResponse) ProtoMessage() {}
|
||||
|
||||
func (x *CreateAuthMethodResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_auth_methods_proto_msgTypes[2]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use CreateAuthMethodResponse.ProtoReflect.Descriptor instead.
|
||||
func (*CreateAuthMethodResponse) Descriptor() ([]byte, []int) {
|
||||
return file_api_auth_methods_proto_rawDescGZIP(), []int{2}
|
||||
}
|
||||
|
||||
func (x *CreateAuthMethodResponse) GetAuthMethod() *AuthMethod {
|
||||
if x != nil {
|
||||
return x.AuthMethod
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type ListAuthMethodsRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
}
|
||||
|
||||
func (x *ListAuthMethodsRequest) Reset() {
|
||||
*x = ListAuthMethodsRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_auth_methods_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *ListAuthMethodsRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ListAuthMethodsRequest) ProtoMessage() {}
|
||||
|
||||
func (x *ListAuthMethodsRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_auth_methods_proto_msgTypes[3]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use ListAuthMethodsRequest.ProtoReflect.Descriptor instead.
|
||||
func (*ListAuthMethodsRequest) Descriptor() ([]byte, []int) {
|
||||
return file_api_auth_methods_proto_rawDescGZIP(), []int{3}
|
||||
}
|
||||
|
||||
type ListAuthMethodsResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
AuthMethods []*AuthMethod `protobuf:"bytes,1,rep,name=auth_methods,json=authMethods,proto3" json:"auth_methods,omitempty"`
|
||||
}
|
||||
|
||||
func (x *ListAuthMethodsResponse) Reset() {
|
||||
*x = ListAuthMethodsResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_auth_methods_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *ListAuthMethodsResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ListAuthMethodsResponse) ProtoMessage() {}
|
||||
|
||||
func (x *ListAuthMethodsResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_auth_methods_proto_msgTypes[4]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
// Deprecated: Use ListAuthMethodsResponse.ProtoReflect.Descriptor instead.
|
||||
func (*ListAuthMethodsResponse) Descriptor() ([]byte, []int) {
|
||||
return file_api_auth_methods_proto_rawDescGZIP(), []int{4}
|
||||
}
|
||||
|
||||
func (x *ListAuthMethodsResponse) GetAuthMethods() []*AuthMethod {
|
||||
if x != nil {
|
||||
return x.AuthMethods
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
var File_api_auth_methods_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_api_auth_methods_proto_rawDesc = []byte{
|
||||
0x0a, 0x16, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x5f, 0x6d, 0x65, 0x74, 0x68, 0x6f,
|
||||
0x64, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x03, 0x61, 0x70, 0x69, 0x22, 0x79, 0x0a,
|
||||
0x0a, 0x41, 0x75, 0x74, 0x68, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69,
|
||||
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x74,
|
||||
0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12,
|
||||
0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e,
|
||||
0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x18, 0x04, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x06, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x63,
|
||||
0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08,
|
||||
0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x22, 0x9b, 0x01, 0x0a, 0x17, 0x43, 0x72, 0x65,
|
||||
0x61, 0x74, 0x65, 0x41, 0x75, 0x74, 0x68, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x52, 0x65, 0x71,
|
||||
0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65,
|
||||
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06,
|
||||
0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x69, 0x73,
|
||||
0x73, 0x75, 0x65, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x69,
|
||||
0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49,
|
||||
0x64, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x65, 0x63, 0x72,
|
||||
0x65, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74,
|
||||
0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x22, 0x4c, 0x0a, 0x18, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65,
|
||||
0x41, 0x75, 0x74, 0x68, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
|
||||
0x73, 0x65, 0x12, 0x30, 0x0a, 0x0b, 0x61, 0x75, 0x74, 0x68, 0x5f, 0x6d, 0x65, 0x74, 0x68, 0x6f,
|
||||
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x41, 0x75,
|
||||
0x74, 0x68, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x52, 0x0a, 0x61, 0x75, 0x74, 0x68, 0x4d, 0x65,
|
||||
0x74, 0x68, 0x6f, 0x64, 0x22, 0x18, 0x0a, 0x16, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x75, 0x74, 0x68,
|
||||
0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x4d,
|
||||
0x0a, 0x17, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x75, 0x74, 0x68, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64,
|
||||
0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x32, 0x0a, 0x0c, 0x61, 0x75, 0x74,
|
||||
0x68, 0x5f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32,
|
||||
0x0f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64,
|
||||
0x52, 0x0b, 0x61, 0x75, 0x74, 0x68, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x42, 0x2a, 0x5a,
|
||||
0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6a, 0x73, 0x69, 0x65,
|
||||
0x62, 0x65, 0x6e, 0x73, 0x2f, 0x69, 0x6f, 0x6e, 0x73, 0x63, 0x61, 0x6c, 0x65, 0x2f, 0x70, 0x6b,
|
||||
0x67, 0x2f, 0x67, 0x65, 0x6e, 0x3b, 0x61, 0x70, 0x69, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||
0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_api_auth_methods_proto_rawDescOnce sync.Once
|
||||
file_api_auth_methods_proto_rawDescData = file_api_auth_methods_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_api_auth_methods_proto_rawDescGZIP() []byte {
|
||||
file_api_auth_methods_proto_rawDescOnce.Do(func() {
|
||||
file_api_auth_methods_proto_rawDescData = protoimpl.X.CompressGZIP(file_api_auth_methods_proto_rawDescData)
|
||||
})
|
||||
return file_api_auth_methods_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_api_auth_methods_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
|
||||
var file_api_auth_methods_proto_goTypes = []interface{}{
|
||||
(*AuthMethod)(nil), // 0: api.AuthMethod
|
||||
(*CreateAuthMethodRequest)(nil), // 1: api.CreateAuthMethodRequest
|
||||
(*CreateAuthMethodResponse)(nil), // 2: api.CreateAuthMethodResponse
|
||||
(*ListAuthMethodsRequest)(nil), // 3: api.ListAuthMethodsRequest
|
||||
(*ListAuthMethodsResponse)(nil), // 4: api.ListAuthMethodsResponse
|
||||
}
|
||||
var file_api_auth_methods_proto_depIdxs = []int32{
|
||||
0, // 0: api.CreateAuthMethodResponse.auth_method:type_name -> api.AuthMethod
|
||||
0, // 1: api.ListAuthMethodsResponse.auth_methods:type_name -> api.AuthMethod
|
||||
2, // [2:2] is the sub-list for method output_type
|
||||
2, // [2:2] is the sub-list for method input_type
|
||||
2, // [2:2] is the sub-list for extension type_name
|
||||
2, // [2:2] is the sub-list for extension extendee
|
||||
0, // [0:2] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_api_auth_methods_proto_init() }
|
||||
func file_api_auth_methods_proto_init() {
|
||||
if File_api_auth_methods_proto != nil {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_api_auth_methods_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*AuthMethod); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_api_auth_methods_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*CreateAuthMethodRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_api_auth_methods_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*CreateAuthMethodResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_api_auth_methods_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ListAuthMethodsRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_api_auth_methods_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ListAuthMethodsResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_api_auth_methods_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 5,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_api_auth_methods_proto_goTypes,
|
||||
DependencyIndexes: file_api_auth_methods_proto_depIdxs,
|
||||
MessageInfos: file_api_auth_methods_proto_msgTypes,
|
||||
}.Build()
|
||||
File_api_auth_methods_proto = out.File
|
||||
file_api_auth_methods_proto_rawDesc = nil
|
||||
file_api_auth_methods_proto_goTypes = nil
|
||||
file_api_auth_methods_proto_depIdxs = nil
|
||||
}
|
||||
+192
-172
@@ -32,193 +32,212 @@ var file_api_ionscale_proto_rawDesc = []byte{
|
||||
0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x11, 0x61, 0x70, 0x69, 0x2f,
|
||||
0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x12, 0x61,
|
||||
0x70, 0x69, 0x2f, 0x74, 0x61, 0x69, 0x6c, 0x6e, 0x65, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74,
|
||||
0x6f, 0x1a, 0x13, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x5f, 0x6b, 0x65, 0x79, 0x73,
|
||||
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x12, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x61, 0x63, 0x68,
|
||||
0x69, 0x6e, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x10, 0x61, 0x70, 0x69, 0x2f,
|
||||
0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0d, 0x61, 0x70,
|
||||
0x69, 0x2f, 0x64, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0d, 0x61, 0x70, 0x69,
|
||||
0x2f, 0x61, 0x63, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0e, 0x61, 0x70, 0x69, 0x2f,
|
||||
0x64, 0x65, 0x72, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0xa0, 0x0b, 0x0a, 0x08, 0x49,
|
||||
0x6f, 0x6e, 0x73, 0x63, 0x61, 0x6c, 0x65, 0x12, 0x3f, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x56, 0x65,
|
||||
0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x56,
|
||||
0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e,
|
||||
0x6f, 0x1a, 0x16, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x5f, 0x6d, 0x65, 0x74, 0x68,
|
||||
0x6f, 0x64, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x13, 0x61, 0x70, 0x69, 0x2f, 0x61,
|
||||
0x75, 0x74, 0x68, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x12,
|
||||
0x61, 0x70, 0x69, 0x2f, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f,
|
||||
0x74, 0x6f, 0x1a, 0x10, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x70,
|
||||
0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0d, 0x61, 0x70, 0x69, 0x2f, 0x64, 0x6e, 0x73, 0x2e, 0x70, 0x72,
|
||||
0x6f, 0x74, 0x6f, 0x1a, 0x0d, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x63, 0x6c, 0x2e, 0x70, 0x72, 0x6f,
|
||||
0x74, 0x6f, 0x1a, 0x0e, 0x61, 0x70, 0x69, 0x2f, 0x64, 0x65, 0x72, 0x70, 0x2e, 0x70, 0x72, 0x6f,
|
||||
0x74, 0x6f, 0x32, 0xc3, 0x0c, 0x0a, 0x08, 0x49, 0x6f, 0x6e, 0x73, 0x63, 0x61, 0x6c, 0x65, 0x12,
|
||||
0x3f, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x2e,
|
||||
0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65,
|
||||
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x3f, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x44,
|
||||
0x45, 0x52, 0x50, 0x4d, 0x61, 0x70, 0x12, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74,
|
||||
0x44, 0x45, 0x52, 0x50, 0x4d, 0x61, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17,
|
||||
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x56,
|
||||
0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00,
|
||||
0x12, 0x3f, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x44, 0x45, 0x52, 0x50, 0x4d, 0x61, 0x70, 0x12, 0x16,
|
||||
0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x45, 0x52, 0x50, 0x4d, 0x61, 0x70, 0x52,
|
||||
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x3f, 0x0a, 0x0a, 0x53, 0x65, 0x74,
|
||||
0x44, 0x45, 0x52, 0x50, 0x4d, 0x61, 0x70, 0x12, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x65,
|
||||
0x74, 0x44, 0x45, 0x52, 0x50, 0x4d, 0x61, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
|
||||
0x17, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x65, 0x74, 0x44, 0x45, 0x52, 0x50, 0x4d, 0x61, 0x70,
|
||||
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x48, 0x0a, 0x0d, 0x43, 0x72,
|
||||
0x65, 0x61, 0x74, 0x65, 0x54, 0x61, 0x69, 0x6c, 0x6e, 0x65, 0x74, 0x12, 0x19, 0x2e, 0x61, 0x70,
|
||||
0x69, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x61, 0x69, 0x6c, 0x6e, 0x65, 0x74, 0x52,
|
||||
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x72, 0x65,
|
||||
0x61, 0x74, 0x65, 0x54, 0x61, 0x69, 0x6c, 0x6e, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
|
||||
0x73, 0x65, 0x22, 0x00, 0x12, 0x3f, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x54, 0x61, 0x69, 0x6c, 0x6e,
|
||||
0x65, 0x74, 0x12, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x61, 0x69, 0x6c,
|
||||
0x6e, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x61, 0x70, 0x69,
|
||||
0x2e, 0x47, 0x65, 0x74, 0x54, 0x61, 0x69, 0x6c, 0x6e, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f,
|
||||
0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x43, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x61, 0x69,
|
||||
0x6c, 0x6e, 0x65, 0x74, 0x73, 0x12, 0x17, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74,
|
||||
0x54, 0x61, 0x69, 0x6c, 0x6e, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18,
|
||||
0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x61, 0x69, 0x6c, 0x6e, 0x65, 0x74,
|
||||
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x48, 0x0a, 0x0d, 0x44, 0x65,
|
||||
0x6c, 0x65, 0x74, 0x65, 0x54, 0x61, 0x69, 0x6c, 0x6e, 0x65, 0x74, 0x12, 0x19, 0x2e, 0x61, 0x70,
|
||||
0x69, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x61, 0x69, 0x6c, 0x6e, 0x65, 0x74, 0x52,
|
||||
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x44, 0x65, 0x6c,
|
||||
0x65, 0x74, 0x65, 0x54, 0x61, 0x69, 0x6c, 0x6e, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
|
||||
0x73, 0x65, 0x22, 0x00, 0x12, 0x45, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x44, 0x4e, 0x53, 0x43, 0x6f,
|
||||
0x6e, 0x66, 0x69, 0x67, 0x12, 0x18, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x4e,
|
||||
0x53, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19,
|
||||
0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x4e, 0x53, 0x43, 0x6f, 0x6e, 0x66, 0x69,
|
||||
0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x45, 0x0a, 0x0c, 0x53,
|
||||
0x65, 0x74, 0x44, 0x4e, 0x53, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x18, 0x2e, 0x61, 0x70,
|
||||
0x69, 0x2e, 0x53, 0x65, 0x74, 0x44, 0x4e, 0x53, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65,
|
||||
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x65, 0x74, 0x44,
|
||||
0x4e, 0x53, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
|
||||
0x22, 0x00, 0x12, 0x45, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x41, 0x43, 0x4c, 0x50, 0x6f, 0x6c, 0x69,
|
||||
0x63, 0x79, 0x12, 0x18, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x43, 0x4c, 0x50,
|
||||
0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x61,
|
||||
0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x43, 0x4c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52,
|
||||
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x45, 0x0a, 0x0c, 0x53, 0x65, 0x74,
|
||||
0x41, 0x43, 0x4c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x18, 0x2e, 0x61, 0x70, 0x69, 0x2e,
|
||||
0x53, 0x65, 0x74, 0x41, 0x43, 0x4c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x71, 0x75,
|
||||
0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x65, 0x74, 0x41, 0x43, 0x4c,
|
||||
0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00,
|
||||
0x12, 0x3f, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x41, 0x75, 0x74, 0x68, 0x4b, 0x65, 0x79, 0x12, 0x16,
|
||||
0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x75, 0x74, 0x68, 0x4b, 0x65, 0x79, 0x52,
|
||||
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74,
|
||||
0x41, 0x75, 0x74, 0x68, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22,
|
||||
0x00, 0x12, 0x48, 0x0a, 0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x75, 0x74, 0x68, 0x4b,
|
||||
0x65, 0x79, 0x12, 0x19, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41,
|
||||
0x75, 0x74, 0x68, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e,
|
||||
0x44, 0x45, 0x52, 0x50, 0x4d, 0x61, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22,
|
||||
0x00, 0x12, 0x3f, 0x0a, 0x0a, 0x53, 0x65, 0x74, 0x44, 0x45, 0x52, 0x50, 0x4d, 0x61, 0x70, 0x12,
|
||||
0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x65, 0x74, 0x44, 0x45, 0x52, 0x50, 0x4d, 0x61, 0x70,
|
||||
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x65,
|
||||
0x74, 0x44, 0x45, 0x52, 0x50, 0x4d, 0x61, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
|
||||
0x22, 0x00, 0x12, 0x51, 0x0a, 0x10, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x75, 0x74, 0x68,
|
||||
0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x1c, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x72, 0x65,
|
||||
0x61, 0x74, 0x65, 0x41, 0x75, 0x74, 0x68, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x52, 0x65, 0x71,
|
||||
0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74,
|
||||
0x65, 0x41, 0x75, 0x74, 0x68, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f,
|
||||
0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4e, 0x0a, 0x0f, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x75, 0x74,
|
||||
0x68, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x12, 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c,
|
||||
0x69, 0x73, 0x74, 0x41, 0x75, 0x74, 0x68, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x52, 0x65,
|
||||
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74,
|
||||
0x41, 0x75, 0x74, 0x68, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f,
|
||||
0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x48, 0x0a, 0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54,
|
||||
0x61, 0x69, 0x6c, 0x6e, 0x65, 0x74, 0x12, 0x19, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x72, 0x65,
|
||||
0x61, 0x74, 0x65, 0x54, 0x61, 0x69, 0x6c, 0x6e, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
|
||||
0x74, 0x1a, 0x1a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x61,
|
||||
0x69, 0x6c, 0x6e, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12,
|
||||
0x3f, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x54, 0x61, 0x69, 0x6c, 0x6e, 0x65, 0x74, 0x12, 0x16, 0x2e,
|
||||
0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x61, 0x69, 0x6c, 0x6e, 0x65, 0x74, 0x52, 0x65,
|
||||
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x54,
|
||||
0x61, 0x69, 0x6c, 0x6e, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00,
|
||||
0x12, 0x43, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x61, 0x69, 0x6c, 0x6e, 0x65, 0x74, 0x73,
|
||||
0x12, 0x17, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x61, 0x69, 0x6c, 0x6e,
|
||||
0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x61, 0x70, 0x69, 0x2e,
|
||||
0x4c, 0x69, 0x73, 0x74, 0x54, 0x61, 0x69, 0x6c, 0x6e, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f,
|
||||
0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x48, 0x0a, 0x0d, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54,
|
||||
0x61, 0x69, 0x6c, 0x6e, 0x65, 0x74, 0x12, 0x19, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x44, 0x65, 0x6c,
|
||||
0x65, 0x74, 0x65, 0x54, 0x61, 0x69, 0x6c, 0x6e, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
|
||||
0x74, 0x1a, 0x1a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x61,
|
||||
0x69, 0x6c, 0x6e, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12,
|
||||
0x45, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x44, 0x4e, 0x53, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12,
|
||||
0x18, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x4e, 0x53, 0x43, 0x6f, 0x6e, 0x66,
|
||||
0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x61, 0x70, 0x69, 0x2e,
|
||||
0x47, 0x65, 0x74, 0x44, 0x4e, 0x53, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70,
|
||||
0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x45, 0x0a, 0x0c, 0x53, 0x65, 0x74, 0x44, 0x4e, 0x53,
|
||||
0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x18, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x65, 0x74,
|
||||
0x44, 0x4e, 0x53, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
|
||||
0x1a, 0x19, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x65, 0x74, 0x44, 0x4e, 0x53, 0x43, 0x6f, 0x6e,
|
||||
0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x45, 0x0a,
|
||||
0x0c, 0x47, 0x65, 0x74, 0x41, 0x43, 0x4c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x12, 0x18, 0x2e,
|
||||
0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x43, 0x4c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79,
|
||||
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65,
|
||||
0x74, 0x41, 0x43, 0x4c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
|
||||
0x73, 0x65, 0x22, 0x00, 0x12, 0x45, 0x0a, 0x0c, 0x53, 0x65, 0x74, 0x41, 0x43, 0x4c, 0x50, 0x6f,
|
||||
0x6c, 0x69, 0x63, 0x79, 0x12, 0x18, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x65, 0x74, 0x41, 0x43,
|
||||
0x4c, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19,
|
||||
0x2e, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x65, 0x74, 0x41, 0x43, 0x4c, 0x50, 0x6f, 0x6c, 0x69, 0x63,
|
||||
0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x3f, 0x0a, 0x0a, 0x47,
|
||||
0x65, 0x74, 0x41, 0x75, 0x74, 0x68, 0x4b, 0x65, 0x79, 0x12, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e,
|
||||
0x47, 0x65, 0x74, 0x41, 0x75, 0x74, 0x68, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
|
||||
0x74, 0x1a, 0x17, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x75, 0x74, 0x68, 0x4b,
|
||||
0x65, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x48, 0x0a, 0x0d,
|
||||
0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x75, 0x74, 0x68, 0x4b, 0x65, 0x79, 0x12, 0x19, 0x2e,
|
||||
0x61, 0x70, 0x69, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x75, 0x74, 0x68, 0x4b, 0x65,
|
||||
0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x48, 0x0a, 0x0d, 0x44,
|
||||
0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x75, 0x74, 0x68, 0x4b, 0x65, 0x79, 0x12, 0x19, 0x2e, 0x61,
|
||||
0x70, 0x69, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x75, 0x74, 0x68, 0x4b, 0x65, 0x79,
|
||||
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x44, 0x65,
|
||||
0x6c, 0x65, 0x74, 0x65, 0x41, 0x75, 0x74, 0x68, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f,
|
||||
0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x45, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x75, 0x74,
|
||||
0x68, 0x4b, 0x65, 0x79, 0x73, 0x12, 0x18, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74,
|
||||
0x41, 0x75, 0x74, 0x68, 0x4b, 0x65, 0x79, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
|
||||
0x19, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x75, 0x74, 0x68, 0x4b, 0x65,
|
||||
0x79, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x45, 0x0a, 0x0c,
|
||||
0x4c, 0x69, 0x73, 0x74, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x73, 0x12, 0x18, 0x2e, 0x61,
|
||||
0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x73, 0x52,
|
||||
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73,
|
||||
0x74, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
|
||||
0x65, 0x22, 0x00, 0x12, 0x48, 0x0a, 0x0d, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, 0x4d, 0x61, 0x63,
|
||||
0x68, 0x69, 0x6e, 0x65, 0x12, 0x19, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x45, 0x78, 0x70, 0x69, 0x72,
|
||||
0x65, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
|
||||
0x1a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, 0x4d, 0x61, 0x63, 0x68,
|
||||
0x69, 0x6e, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x48, 0x0a,
|
||||
0x0d, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x12, 0x19,
|
||||
0x2e, 0x61, 0x70, 0x69, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4d, 0x61, 0x63, 0x68, 0x69,
|
||||
0x6e, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x61, 0x70, 0x69, 0x2e,
|
||||
0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x52, 0x65, 0x73,
|
||||
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x51, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x4d, 0x61,
|
||||
0x63, 0x68, 0x69, 0x6e, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x12, 0x1c, 0x2e, 0x61, 0x70,
|
||||
0x69, 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x52, 0x6f, 0x75, 0x74,
|
||||
0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x61, 0x70, 0x69, 0x2e,
|
||||
0x47, 0x65, 0x74, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73,
|
||||
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x51, 0x0a, 0x10, 0x53, 0x65,
|
||||
0x74, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x12, 0x1c,
|
||||
0x2e, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x65, 0x74, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x52,
|
||||
0x6f, 0x75, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x61,
|
||||
0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x52, 0x6f, 0x75,
|
||||
0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x2a, 0x5a,
|
||||
0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6a, 0x73, 0x69, 0x65,
|
||||
0x62, 0x65, 0x6e, 0x73, 0x2f, 0x69, 0x6f, 0x6e, 0x73, 0x63, 0x61, 0x6c, 0x65, 0x2f, 0x70, 0x6b,
|
||||
0x67, 0x2f, 0x67, 0x65, 0x6e, 0x3b, 0x61, 0x70, 0x69, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||
0x33,
|
||||
0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43,
|
||||
0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x75, 0x74, 0x68, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x73, 0x70,
|
||||
0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x48, 0x0a, 0x0d, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65,
|
||||
0x41, 0x75, 0x74, 0x68, 0x4b, 0x65, 0x79, 0x12, 0x19, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x44, 0x65,
|
||||
0x6c, 0x65, 0x74, 0x65, 0x41, 0x75, 0x74, 0x68, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65,
|
||||
0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41,
|
||||
0x75, 0x74, 0x68, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00,
|
||||
0x12, 0x45, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x75, 0x74, 0x68, 0x4b, 0x65, 0x79, 0x73,
|
||||
0x12, 0x18, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x75, 0x74, 0x68, 0x4b,
|
||||
0x65, 0x79, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x61, 0x70, 0x69,
|
||||
0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x75, 0x74, 0x68, 0x4b, 0x65, 0x79, 0x73, 0x52, 0x65, 0x73,
|
||||
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x45, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x4d,
|
||||
0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x73, 0x12, 0x18, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69,
|
||||
0x73, 0x74, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
|
||||
0x74, 0x1a, 0x19, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x61, 0x63, 0x68,
|
||||
0x69, 0x6e, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x48,
|
||||
0x0a, 0x0d, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x12,
|
||||
0x19, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, 0x4d, 0x61, 0x63, 0x68,
|
||||
0x69, 0x6e, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x61, 0x70, 0x69,
|
||||
0x2e, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x52, 0x65,
|
||||
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x48, 0x0a, 0x0d, 0x44, 0x65, 0x6c, 0x65,
|
||||
0x74, 0x65, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x12, 0x19, 0x2e, 0x61, 0x70, 0x69, 0x2e,
|
||||
0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x52, 0x65, 0x71,
|
||||
0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74,
|
||||
0x65, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
|
||||
0x22, 0x00, 0x12, 0x51, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65,
|
||||
0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x12, 0x1c, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74,
|
||||
0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71,
|
||||
0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x61,
|
||||
0x63, 0x68, 0x69, 0x6e, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f,
|
||||
0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x51, 0x0a, 0x10, 0x53, 0x65, 0x74, 0x4d, 0x61, 0x63, 0x68,
|
||||
0x69, 0x6e, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x12, 0x1c, 0x2e, 0x61, 0x70, 0x69, 0x2e,
|
||||
0x53, 0x65, 0x74, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73,
|
||||
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65,
|
||||
0x74, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x52, 0x65,
|
||||
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x2a, 0x5a, 0x28, 0x67, 0x69, 0x74, 0x68,
|
||||
0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6a, 0x73, 0x69, 0x65, 0x62, 0x65, 0x6e, 0x73, 0x2f,
|
||||
0x69, 0x6f, 0x6e, 0x73, 0x63, 0x61, 0x6c, 0x65, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x67, 0x65, 0x6e,
|
||||
0x3b, 0x61, 0x70, 0x69, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var file_api_ionscale_proto_goTypes = []interface{}{
|
||||
(*GetVersionRequest)(nil), // 0: api.GetVersionRequest
|
||||
(*GetDERPMapRequest)(nil), // 1: api.GetDERPMapRequest
|
||||
(*SetDERPMapRequest)(nil), // 2: api.SetDERPMapRequest
|
||||
(*CreateTailnetRequest)(nil), // 3: api.CreateTailnetRequest
|
||||
(*GetTailnetRequest)(nil), // 4: api.GetTailnetRequest
|
||||
(*ListTailnetRequest)(nil), // 5: api.ListTailnetRequest
|
||||
(*DeleteTailnetRequest)(nil), // 6: api.DeleteTailnetRequest
|
||||
(*GetDNSConfigRequest)(nil), // 7: api.GetDNSConfigRequest
|
||||
(*SetDNSConfigRequest)(nil), // 8: api.SetDNSConfigRequest
|
||||
(*GetACLPolicyRequest)(nil), // 9: api.GetACLPolicyRequest
|
||||
(*SetACLPolicyRequest)(nil), // 10: api.SetACLPolicyRequest
|
||||
(*GetAuthKeyRequest)(nil), // 11: api.GetAuthKeyRequest
|
||||
(*CreateAuthKeyRequest)(nil), // 12: api.CreateAuthKeyRequest
|
||||
(*DeleteAuthKeyRequest)(nil), // 13: api.DeleteAuthKeyRequest
|
||||
(*ListAuthKeysRequest)(nil), // 14: api.ListAuthKeysRequest
|
||||
(*ListMachinesRequest)(nil), // 15: api.ListMachinesRequest
|
||||
(*ExpireMachineRequest)(nil), // 16: api.ExpireMachineRequest
|
||||
(*DeleteMachineRequest)(nil), // 17: api.DeleteMachineRequest
|
||||
(*GetMachineRoutesRequest)(nil), // 18: api.GetMachineRoutesRequest
|
||||
(*SetMachineRoutesRequest)(nil), // 19: api.SetMachineRoutesRequest
|
||||
(*GetVersionResponse)(nil), // 20: api.GetVersionResponse
|
||||
(*GetDERPMapResponse)(nil), // 21: api.GetDERPMapResponse
|
||||
(*SetDERPMapResponse)(nil), // 22: api.SetDERPMapResponse
|
||||
(*CreateTailnetResponse)(nil), // 23: api.CreateTailnetResponse
|
||||
(*GetTailnetResponse)(nil), // 24: api.GetTailnetResponse
|
||||
(*ListTailnetResponse)(nil), // 25: api.ListTailnetResponse
|
||||
(*DeleteTailnetResponse)(nil), // 26: api.DeleteTailnetResponse
|
||||
(*GetDNSConfigResponse)(nil), // 27: api.GetDNSConfigResponse
|
||||
(*SetDNSConfigResponse)(nil), // 28: api.SetDNSConfigResponse
|
||||
(*GetACLPolicyResponse)(nil), // 29: api.GetACLPolicyResponse
|
||||
(*SetACLPolicyResponse)(nil), // 30: api.SetACLPolicyResponse
|
||||
(*GetAuthKeyResponse)(nil), // 31: api.GetAuthKeyResponse
|
||||
(*CreateAuthKeyResponse)(nil), // 32: api.CreateAuthKeyResponse
|
||||
(*DeleteAuthKeyResponse)(nil), // 33: api.DeleteAuthKeyResponse
|
||||
(*ListAuthKeysResponse)(nil), // 34: api.ListAuthKeysResponse
|
||||
(*ListMachinesResponse)(nil), // 35: api.ListMachinesResponse
|
||||
(*ExpireMachineResponse)(nil), // 36: api.ExpireMachineResponse
|
||||
(*DeleteMachineResponse)(nil), // 37: api.DeleteMachineResponse
|
||||
(*GetMachineRoutesResponse)(nil), // 38: api.GetMachineRoutesResponse
|
||||
(*CreateAuthMethodRequest)(nil), // 3: api.CreateAuthMethodRequest
|
||||
(*ListAuthMethodsRequest)(nil), // 4: api.ListAuthMethodsRequest
|
||||
(*CreateTailnetRequest)(nil), // 5: api.CreateTailnetRequest
|
||||
(*GetTailnetRequest)(nil), // 6: api.GetTailnetRequest
|
||||
(*ListTailnetRequest)(nil), // 7: api.ListTailnetRequest
|
||||
(*DeleteTailnetRequest)(nil), // 8: api.DeleteTailnetRequest
|
||||
(*GetDNSConfigRequest)(nil), // 9: api.GetDNSConfigRequest
|
||||
(*SetDNSConfigRequest)(nil), // 10: api.SetDNSConfigRequest
|
||||
(*GetACLPolicyRequest)(nil), // 11: api.GetACLPolicyRequest
|
||||
(*SetACLPolicyRequest)(nil), // 12: api.SetACLPolicyRequest
|
||||
(*GetAuthKeyRequest)(nil), // 13: api.GetAuthKeyRequest
|
||||
(*CreateAuthKeyRequest)(nil), // 14: api.CreateAuthKeyRequest
|
||||
(*DeleteAuthKeyRequest)(nil), // 15: api.DeleteAuthKeyRequest
|
||||
(*ListAuthKeysRequest)(nil), // 16: api.ListAuthKeysRequest
|
||||
(*ListMachinesRequest)(nil), // 17: api.ListMachinesRequest
|
||||
(*ExpireMachineRequest)(nil), // 18: api.ExpireMachineRequest
|
||||
(*DeleteMachineRequest)(nil), // 19: api.DeleteMachineRequest
|
||||
(*GetMachineRoutesRequest)(nil), // 20: api.GetMachineRoutesRequest
|
||||
(*SetMachineRoutesRequest)(nil), // 21: api.SetMachineRoutesRequest
|
||||
(*GetVersionResponse)(nil), // 22: api.GetVersionResponse
|
||||
(*GetDERPMapResponse)(nil), // 23: api.GetDERPMapResponse
|
||||
(*SetDERPMapResponse)(nil), // 24: api.SetDERPMapResponse
|
||||
(*CreateAuthMethodResponse)(nil), // 25: api.CreateAuthMethodResponse
|
||||
(*ListAuthMethodsResponse)(nil), // 26: api.ListAuthMethodsResponse
|
||||
(*CreateTailnetResponse)(nil), // 27: api.CreateTailnetResponse
|
||||
(*GetTailnetResponse)(nil), // 28: api.GetTailnetResponse
|
||||
(*ListTailnetResponse)(nil), // 29: api.ListTailnetResponse
|
||||
(*DeleteTailnetResponse)(nil), // 30: api.DeleteTailnetResponse
|
||||
(*GetDNSConfigResponse)(nil), // 31: api.GetDNSConfigResponse
|
||||
(*SetDNSConfigResponse)(nil), // 32: api.SetDNSConfigResponse
|
||||
(*GetACLPolicyResponse)(nil), // 33: api.GetACLPolicyResponse
|
||||
(*SetACLPolicyResponse)(nil), // 34: api.SetACLPolicyResponse
|
||||
(*GetAuthKeyResponse)(nil), // 35: api.GetAuthKeyResponse
|
||||
(*CreateAuthKeyResponse)(nil), // 36: api.CreateAuthKeyResponse
|
||||
(*DeleteAuthKeyResponse)(nil), // 37: api.DeleteAuthKeyResponse
|
||||
(*ListAuthKeysResponse)(nil), // 38: api.ListAuthKeysResponse
|
||||
(*ListMachinesResponse)(nil), // 39: api.ListMachinesResponse
|
||||
(*ExpireMachineResponse)(nil), // 40: api.ExpireMachineResponse
|
||||
(*DeleteMachineResponse)(nil), // 41: api.DeleteMachineResponse
|
||||
(*GetMachineRoutesResponse)(nil), // 42: api.GetMachineRoutesResponse
|
||||
}
|
||||
var file_api_ionscale_proto_depIdxs = []int32{
|
||||
0, // 0: api.Ionscale.GetVersion:input_type -> api.GetVersionRequest
|
||||
1, // 1: api.Ionscale.GetDERPMap:input_type -> api.GetDERPMapRequest
|
||||
2, // 2: api.Ionscale.SetDERPMap:input_type -> api.SetDERPMapRequest
|
||||
3, // 3: api.Ionscale.CreateTailnet:input_type -> api.CreateTailnetRequest
|
||||
4, // 4: api.Ionscale.GetTailnet:input_type -> api.GetTailnetRequest
|
||||
5, // 5: api.Ionscale.ListTailnets:input_type -> api.ListTailnetRequest
|
||||
6, // 6: api.Ionscale.DeleteTailnet:input_type -> api.DeleteTailnetRequest
|
||||
7, // 7: api.Ionscale.GetDNSConfig:input_type -> api.GetDNSConfigRequest
|
||||
8, // 8: api.Ionscale.SetDNSConfig:input_type -> api.SetDNSConfigRequest
|
||||
9, // 9: api.Ionscale.GetACLPolicy:input_type -> api.GetACLPolicyRequest
|
||||
10, // 10: api.Ionscale.SetACLPolicy:input_type -> api.SetACLPolicyRequest
|
||||
11, // 11: api.Ionscale.GetAuthKey:input_type -> api.GetAuthKeyRequest
|
||||
12, // 12: api.Ionscale.CreateAuthKey:input_type -> api.CreateAuthKeyRequest
|
||||
13, // 13: api.Ionscale.DeleteAuthKey:input_type -> api.DeleteAuthKeyRequest
|
||||
14, // 14: api.Ionscale.ListAuthKeys:input_type -> api.ListAuthKeysRequest
|
||||
15, // 15: api.Ionscale.ListMachines:input_type -> api.ListMachinesRequest
|
||||
16, // 16: api.Ionscale.ExpireMachine:input_type -> api.ExpireMachineRequest
|
||||
17, // 17: api.Ionscale.DeleteMachine:input_type -> api.DeleteMachineRequest
|
||||
18, // 18: api.Ionscale.GetMachineRoutes:input_type -> api.GetMachineRoutesRequest
|
||||
19, // 19: api.Ionscale.SetMachineRoutes:input_type -> api.SetMachineRoutesRequest
|
||||
20, // 20: api.Ionscale.GetVersion:output_type -> api.GetVersionResponse
|
||||
21, // 21: api.Ionscale.GetDERPMap:output_type -> api.GetDERPMapResponse
|
||||
22, // 22: api.Ionscale.SetDERPMap:output_type -> api.SetDERPMapResponse
|
||||
23, // 23: api.Ionscale.CreateTailnet:output_type -> api.CreateTailnetResponse
|
||||
24, // 24: api.Ionscale.GetTailnet:output_type -> api.GetTailnetResponse
|
||||
25, // 25: api.Ionscale.ListTailnets:output_type -> api.ListTailnetResponse
|
||||
26, // 26: api.Ionscale.DeleteTailnet:output_type -> api.DeleteTailnetResponse
|
||||
27, // 27: api.Ionscale.GetDNSConfig:output_type -> api.GetDNSConfigResponse
|
||||
28, // 28: api.Ionscale.SetDNSConfig:output_type -> api.SetDNSConfigResponse
|
||||
29, // 29: api.Ionscale.GetACLPolicy:output_type -> api.GetACLPolicyResponse
|
||||
30, // 30: api.Ionscale.SetACLPolicy:output_type -> api.SetACLPolicyResponse
|
||||
31, // 31: api.Ionscale.GetAuthKey:output_type -> api.GetAuthKeyResponse
|
||||
32, // 32: api.Ionscale.CreateAuthKey:output_type -> api.CreateAuthKeyResponse
|
||||
33, // 33: api.Ionscale.DeleteAuthKey:output_type -> api.DeleteAuthKeyResponse
|
||||
34, // 34: api.Ionscale.ListAuthKeys:output_type -> api.ListAuthKeysResponse
|
||||
35, // 35: api.Ionscale.ListMachines:output_type -> api.ListMachinesResponse
|
||||
36, // 36: api.Ionscale.ExpireMachine:output_type -> api.ExpireMachineResponse
|
||||
37, // 37: api.Ionscale.DeleteMachine:output_type -> api.DeleteMachineResponse
|
||||
38, // 38: api.Ionscale.GetMachineRoutes:output_type -> api.GetMachineRoutesResponse
|
||||
38, // 39: api.Ionscale.SetMachineRoutes:output_type -> api.GetMachineRoutesResponse
|
||||
20, // [20:40] is the sub-list for method output_type
|
||||
0, // [0:20] is the sub-list for method input_type
|
||||
3, // 3: api.Ionscale.CreateAuthMethod:input_type -> api.CreateAuthMethodRequest
|
||||
4, // 4: api.Ionscale.ListAuthMethods:input_type -> api.ListAuthMethodsRequest
|
||||
5, // 5: api.Ionscale.CreateTailnet:input_type -> api.CreateTailnetRequest
|
||||
6, // 6: api.Ionscale.GetTailnet:input_type -> api.GetTailnetRequest
|
||||
7, // 7: api.Ionscale.ListTailnets:input_type -> api.ListTailnetRequest
|
||||
8, // 8: api.Ionscale.DeleteTailnet:input_type -> api.DeleteTailnetRequest
|
||||
9, // 9: api.Ionscale.GetDNSConfig:input_type -> api.GetDNSConfigRequest
|
||||
10, // 10: api.Ionscale.SetDNSConfig:input_type -> api.SetDNSConfigRequest
|
||||
11, // 11: api.Ionscale.GetACLPolicy:input_type -> api.GetACLPolicyRequest
|
||||
12, // 12: api.Ionscale.SetACLPolicy:input_type -> api.SetACLPolicyRequest
|
||||
13, // 13: api.Ionscale.GetAuthKey:input_type -> api.GetAuthKeyRequest
|
||||
14, // 14: api.Ionscale.CreateAuthKey:input_type -> api.CreateAuthKeyRequest
|
||||
15, // 15: api.Ionscale.DeleteAuthKey:input_type -> api.DeleteAuthKeyRequest
|
||||
16, // 16: api.Ionscale.ListAuthKeys:input_type -> api.ListAuthKeysRequest
|
||||
17, // 17: api.Ionscale.ListMachines:input_type -> api.ListMachinesRequest
|
||||
18, // 18: api.Ionscale.ExpireMachine:input_type -> api.ExpireMachineRequest
|
||||
19, // 19: api.Ionscale.DeleteMachine:input_type -> api.DeleteMachineRequest
|
||||
20, // 20: api.Ionscale.GetMachineRoutes:input_type -> api.GetMachineRoutesRequest
|
||||
21, // 21: api.Ionscale.SetMachineRoutes:input_type -> api.SetMachineRoutesRequest
|
||||
22, // 22: api.Ionscale.GetVersion:output_type -> api.GetVersionResponse
|
||||
23, // 23: api.Ionscale.GetDERPMap:output_type -> api.GetDERPMapResponse
|
||||
24, // 24: api.Ionscale.SetDERPMap:output_type -> api.SetDERPMapResponse
|
||||
25, // 25: api.Ionscale.CreateAuthMethod:output_type -> api.CreateAuthMethodResponse
|
||||
26, // 26: api.Ionscale.ListAuthMethods:output_type -> api.ListAuthMethodsResponse
|
||||
27, // 27: api.Ionscale.CreateTailnet:output_type -> api.CreateTailnetResponse
|
||||
28, // 28: api.Ionscale.GetTailnet:output_type -> api.GetTailnetResponse
|
||||
29, // 29: api.Ionscale.ListTailnets:output_type -> api.ListTailnetResponse
|
||||
30, // 30: api.Ionscale.DeleteTailnet:output_type -> api.DeleteTailnetResponse
|
||||
31, // 31: api.Ionscale.GetDNSConfig:output_type -> api.GetDNSConfigResponse
|
||||
32, // 32: api.Ionscale.SetDNSConfig:output_type -> api.SetDNSConfigResponse
|
||||
33, // 33: api.Ionscale.GetACLPolicy:output_type -> api.GetACLPolicyResponse
|
||||
34, // 34: api.Ionscale.SetACLPolicy:output_type -> api.SetACLPolicyResponse
|
||||
35, // 35: api.Ionscale.GetAuthKey:output_type -> api.GetAuthKeyResponse
|
||||
36, // 36: api.Ionscale.CreateAuthKey:output_type -> api.CreateAuthKeyResponse
|
||||
37, // 37: api.Ionscale.DeleteAuthKey:output_type -> api.DeleteAuthKeyResponse
|
||||
38, // 38: api.Ionscale.ListAuthKeys:output_type -> api.ListAuthKeysResponse
|
||||
39, // 39: api.Ionscale.ListMachines:output_type -> api.ListMachinesResponse
|
||||
40, // 40: api.Ionscale.ExpireMachine:output_type -> api.ExpireMachineResponse
|
||||
41, // 41: api.Ionscale.DeleteMachine:output_type -> api.DeleteMachineResponse
|
||||
42, // 42: api.Ionscale.GetMachineRoutes:output_type -> api.GetMachineRoutesResponse
|
||||
42, // 43: api.Ionscale.SetMachineRoutes:output_type -> api.GetMachineRoutesResponse
|
||||
22, // [22:44] is the sub-list for method output_type
|
||||
0, // [0:22] is the sub-list for method input_type
|
||||
0, // [0:0] is the sub-list for extension type_name
|
||||
0, // [0:0] is the sub-list for extension extendee
|
||||
0, // [0:0] is the sub-list for field type_name
|
||||
@@ -231,6 +250,7 @@ func file_api_ionscale_proto_init() {
|
||||
}
|
||||
file_api_version_proto_init()
|
||||
file_api_tailnets_proto_init()
|
||||
file_api_auth_methods_proto_init()
|
||||
file_api_auth_keys_proto_init()
|
||||
file_api_machines_proto_init()
|
||||
file_api_routes_proto_init()
|
||||
|
||||
@@ -21,6 +21,8 @@ type IonscaleClient interface {
|
||||
GetVersion(ctx context.Context, in *GetVersionRequest, opts ...grpc.CallOption) (*GetVersionResponse, error)
|
||||
GetDERPMap(ctx context.Context, in *GetDERPMapRequest, opts ...grpc.CallOption) (*GetDERPMapResponse, error)
|
||||
SetDERPMap(ctx context.Context, in *SetDERPMapRequest, opts ...grpc.CallOption) (*SetDERPMapResponse, error)
|
||||
CreateAuthMethod(ctx context.Context, in *CreateAuthMethodRequest, opts ...grpc.CallOption) (*CreateAuthMethodResponse, error)
|
||||
ListAuthMethods(ctx context.Context, in *ListAuthMethodsRequest, opts ...grpc.CallOption) (*ListAuthMethodsResponse, error)
|
||||
CreateTailnet(ctx context.Context, in *CreateTailnetRequest, opts ...grpc.CallOption) (*CreateTailnetResponse, error)
|
||||
GetTailnet(ctx context.Context, in *GetTailnetRequest, opts ...grpc.CallOption) (*GetTailnetResponse, error)
|
||||
ListTailnets(ctx context.Context, in *ListTailnetRequest, opts ...grpc.CallOption) (*ListTailnetResponse, error)
|
||||
@@ -75,6 +77,24 @@ func (c *ionscaleClient) SetDERPMap(ctx context.Context, in *SetDERPMapRequest,
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *ionscaleClient) CreateAuthMethod(ctx context.Context, in *CreateAuthMethodRequest, opts ...grpc.CallOption) (*CreateAuthMethodResponse, error) {
|
||||
out := new(CreateAuthMethodResponse)
|
||||
err := c.cc.Invoke(ctx, "/api.Ionscale/CreateAuthMethod", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *ionscaleClient) ListAuthMethods(ctx context.Context, in *ListAuthMethodsRequest, opts ...grpc.CallOption) (*ListAuthMethodsResponse, error) {
|
||||
out := new(ListAuthMethodsResponse)
|
||||
err := c.cc.Invoke(ctx, "/api.Ionscale/ListAuthMethods", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *ionscaleClient) CreateTailnet(ctx context.Context, in *CreateTailnetRequest, opts ...grpc.CallOption) (*CreateTailnetResponse, error) {
|
||||
out := new(CreateTailnetResponse)
|
||||
err := c.cc.Invoke(ctx, "/api.Ionscale/CreateTailnet", in, out, opts...)
|
||||
@@ -235,6 +255,8 @@ type IonscaleServer interface {
|
||||
GetVersion(context.Context, *GetVersionRequest) (*GetVersionResponse, error)
|
||||
GetDERPMap(context.Context, *GetDERPMapRequest) (*GetDERPMapResponse, error)
|
||||
SetDERPMap(context.Context, *SetDERPMapRequest) (*SetDERPMapResponse, error)
|
||||
CreateAuthMethod(context.Context, *CreateAuthMethodRequest) (*CreateAuthMethodResponse, error)
|
||||
ListAuthMethods(context.Context, *ListAuthMethodsRequest) (*ListAuthMethodsResponse, error)
|
||||
CreateTailnet(context.Context, *CreateTailnetRequest) (*CreateTailnetResponse, error)
|
||||
GetTailnet(context.Context, *GetTailnetRequest) (*GetTailnetResponse, error)
|
||||
ListTailnets(context.Context, *ListTailnetRequest) (*ListTailnetResponse, error)
|
||||
@@ -267,6 +289,12 @@ func (UnimplementedIonscaleServer) GetDERPMap(context.Context, *GetDERPMapReques
|
||||
func (UnimplementedIonscaleServer) SetDERPMap(context.Context, *SetDERPMapRequest) (*SetDERPMapResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method SetDERPMap not implemented")
|
||||
}
|
||||
func (UnimplementedIonscaleServer) CreateAuthMethod(context.Context, *CreateAuthMethodRequest) (*CreateAuthMethodResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method CreateAuthMethod not implemented")
|
||||
}
|
||||
func (UnimplementedIonscaleServer) ListAuthMethods(context.Context, *ListAuthMethodsRequest) (*ListAuthMethodsResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ListAuthMethods not implemented")
|
||||
}
|
||||
func (UnimplementedIonscaleServer) CreateTailnet(context.Context, *CreateTailnetRequest) (*CreateTailnetResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method CreateTailnet not implemented")
|
||||
}
|
||||
@@ -384,6 +412,42 @@ func _Ionscale_SetDERPMap_Handler(srv interface{}, ctx context.Context, dec func
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Ionscale_CreateAuthMethod_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(CreateAuthMethodRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(IonscaleServer).CreateAuthMethod(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/api.Ionscale/CreateAuthMethod",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(IonscaleServer).CreateAuthMethod(ctx, req.(*CreateAuthMethodRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Ionscale_ListAuthMethods_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ListAuthMethodsRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(IonscaleServer).ListAuthMethods(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/api.Ionscale/ListAuthMethods",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(IonscaleServer).ListAuthMethods(ctx, req.(*ListAuthMethodsRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Ionscale_CreateTailnet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(CreateTailnetRequest)
|
||||
if err := dec(in); err != nil {
|
||||
@@ -709,6 +773,14 @@ var Ionscale_ServiceDesc = grpc.ServiceDesc{
|
||||
MethodName: "SetDERPMap",
|
||||
Handler: _Ionscale_SetDERPMap_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "CreateAuthMethod",
|
||||
Handler: _Ionscale_CreateAuthMethod_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "ListAuthMethods",
|
||||
Handler: _Ionscale_ListAuthMethods_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "CreateTailnet",
|
||||
Handler: _Ionscale_CreateTailnet_Handler,
|
||||
|
||||
+12
-12
@@ -120,7 +120,7 @@ type SetMachineRoutesRequest struct {
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
MachineId uint64 `protobuf:"varint,1,opt,name=machine_id,json=machineId,proto3" json:"machine_id,omitempty"`
|
||||
AllowedIps []string `protobuf:"bytes,2,rep,name=allowedIps,proto3" json:"allowedIps,omitempty"`
|
||||
AllowedIps []string `protobuf:"bytes,2,rep,name=allowed_ips,json=allowedIps,proto3" json:"allowed_ips,omitempty"`
|
||||
}
|
||||
|
||||
func (x *SetMachineRoutesRequest) Reset() {
|
||||
@@ -236,20 +236,20 @@ var file_api_routes_proto_rawDesc = []byte{
|
||||
0x6f, 0x75, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x27, 0x0a,
|
||||
0x06, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e,
|
||||
0x61, 0x70, 0x69, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x49, 0x50, 0x52, 0x06,
|
||||
0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x22, 0x58, 0x0a, 0x17, 0x53, 0x65, 0x74, 0x4d, 0x61, 0x63,
|
||||
0x72, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x22, 0x59, 0x0a, 0x17, 0x53, 0x65, 0x74, 0x4d, 0x61, 0x63,
|
||||
0x68, 0x69, 0x6e, 0x65, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
|
||||
0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x69, 0x64, 0x18,
|
||||
0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x49, 0x64,
|
||||
0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x49, 0x70, 0x73, 0x18, 0x02,
|
||||
0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x49, 0x70, 0x73,
|
||||
0x22, 0x46, 0x0a, 0x0a, 0x52, 0x6f, 0x75, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x49, 0x50, 0x12, 0x1e,
|
||||
0x0a, 0x0a, 0x61, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x0a, 0x61, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x64, 0x12, 0x18,
|
||||
0x0a, 0x07, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52,
|
||||
0x07, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x42, 0x2a, 0x5a, 0x28, 0x67, 0x69, 0x74, 0x68,
|
||||
0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6a, 0x73, 0x69, 0x65, 0x62, 0x65, 0x6e, 0x73, 0x2f,
|
||||
0x69, 0x6f, 0x6e, 0x73, 0x63, 0x61, 0x6c, 0x65, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x67, 0x65, 0x6e,
|
||||
0x3b, 0x61, 0x70, 0x69, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x5f, 0x69, 0x70, 0x73, 0x18,
|
||||
0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x49, 0x70,
|
||||
0x73, 0x22, 0x46, 0x0a, 0x0a, 0x52, 0x6f, 0x75, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x49, 0x50, 0x12,
|
||||
0x1e, 0x0a, 0x0a, 0x61, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x64, 0x18, 0x01, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x0a, 0x61, 0x64, 0x76, 0x65, 0x72, 0x74, 0x69, 0x73, 0x65, 0x64, 0x12,
|
||||
0x18, 0x0a, 0x07, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08,
|
||||
0x52, 0x07, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x42, 0x2a, 0x5a, 0x28, 0x67, 0x69, 0x74,
|
||||
0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6a, 0x73, 0x69, 0x65, 0x62, 0x65, 0x6e, 0x73,
|
||||
0x2f, 0x69, 0x6f, 0x6e, 0x73, 0x63, 0x61, 0x6c, 0x65, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x67, 0x65,
|
||||
0x6e, 0x3b, 0x61, 0x70, 0x69, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
|
||||
+4
-2
@@ -12,17 +12,18 @@ message GetACLPolicyRequest {
|
||||
}
|
||||
|
||||
message GetACLPolicyResponse {
|
||||
Policy policy = 1;
|
||||
bytes value = 1;
|
||||
}
|
||||
|
||||
message SetACLPolicyRequest {
|
||||
uint64 tailnet_id = 1;
|
||||
Policy policy = 2;
|
||||
bytes value = 2;
|
||||
}
|
||||
|
||||
message SetACLPolicyResponse {
|
||||
}
|
||||
|
||||
/*
|
||||
message Policy {
|
||||
map<string, string> hosts = 1;
|
||||
repeated ACL acls = 2;
|
||||
@@ -33,3 +34,4 @@ message ACL {
|
||||
repeated string src = 2;
|
||||
repeated string dst = 3;
|
||||
}
|
||||
*/
|
||||
@@ -0,0 +1,30 @@
|
||||
syntax = "proto3";
|
||||
package api;
|
||||
option go_package = "github.com/jsiebens/ionscale/pkg/gen;api";
|
||||
|
||||
message AuthMethod {
|
||||
uint64 id = 1;
|
||||
string type = 2;
|
||||
string name = 3;
|
||||
string issuer = 4;
|
||||
string client_id = 5;
|
||||
}
|
||||
|
||||
message CreateAuthMethodRequest {
|
||||
string type = 1;
|
||||
string name = 2;
|
||||
string issuer = 3;
|
||||
string client_id = 4;
|
||||
string client_secret = 5;
|
||||
}
|
||||
|
||||
message CreateAuthMethodResponse {
|
||||
AuthMethod auth_method = 1;
|
||||
}
|
||||
|
||||
message ListAuthMethodsRequest {}
|
||||
|
||||
message ListAuthMethodsResponse {
|
||||
repeated AuthMethod auth_methods = 1;
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ import "google/protobuf/duration.proto";
|
||||
|
||||
import "api/version.proto";
|
||||
import "api/tailnets.proto";
|
||||
import "api/auth_methods.proto";
|
||||
import "api/auth_keys.proto";
|
||||
import "api/machines.proto";
|
||||
import "api/routes.proto";
|
||||
@@ -20,6 +21,9 @@ service Ionscale {
|
||||
rpc GetDERPMap (GetDERPMapRequest) returns (GetDERPMapResponse) {}
|
||||
rpc SetDERPMap (SetDERPMapRequest) returns (SetDERPMapResponse) {}
|
||||
|
||||
rpc CreateAuthMethod (CreateAuthMethodRequest) returns (CreateAuthMethodResponse) {}
|
||||
rpc ListAuthMethods (ListAuthMethodsRequest) returns (ListAuthMethodsResponse) {}
|
||||
|
||||
rpc CreateTailnet (CreateTailnetRequest) returns (CreateTailnetResponse) {}
|
||||
rpc GetTailnet (GetTailnetRequest) returns (GetTailnetResponse) {}
|
||||
rpc ListTailnets (ListTailnetRequest) returns (ListTailnetResponse) {}
|
||||
|
||||
@@ -12,7 +12,7 @@ message GetMachineRoutesResponse {
|
||||
|
||||
message SetMachineRoutesRequest {
|
||||
uint64 machine_id = 1;
|
||||
repeated string allowedIps = 2;
|
||||
repeated string allowed_ips = 2;
|
||||
}
|
||||
|
||||
message RoutableIP {
|
||||
|
||||
Reference in New Issue
Block a user