Compare commits

...

10 Commits

Author SHA1 Message Date
allanice001
12f2c5e1c5 feat: dynamically set swagger host, and some ui improvements on ssh page 2025-11-06 05:52:06 +00:00
public-glueops-renovatebot[bot]
7dc7d1a1f1 chore(pindigest): update golang to d2ede9f #patch (#239)
Co-authored-by: public-glueops-renovatebot[bot] <186083205+public-glueops-renovatebot[bot]@users.noreply.github.com>
2025-11-06 05:16:38 +00:00
allanice001
6a16eccce5 fix: relax csp 2025-11-06 05:07:53 +00:00
allanice001
adb3c01382 Merge remote-tracking branch 'origin/main' 2025-11-06 04:43:36 +00:00
allanice001
35b42c6b19 fix: go upgrades didnt patch Dockerfile 2025-11-06 04:43:28 +00:00
public-glueops-renovatebot[bot]
ac12c48c27 chore(pindigest): update postgres to 00bc866 #patch (#237)
Co-authored-by: public-glueops-renovatebot[bot] <186083205+public-glueops-renovatebot[bot]@users.noreply.github.com>
2025-11-06 04:38:07 +00:00
allanice001
04fc75a699 fix: go mod upgrades 2025-11-06 04:37:14 +00:00
allanice001
f4c41cfed7 Merge branch 'main' of github.com:GlueOps/autoglue
# Conflicts:
#	go.mod
#	go.sum
2025-11-06 04:31:49 +00:00
public-glueops-renovatebot[bot]
d7a87c3add feat: update github.com/swaggo/swag to v1.16.6 #minor (#236)
Co-authored-by: public-glueops-renovatebot[bot] <186083205+public-glueops-renovatebot[bot]@users.noreply.github.com>
2025-11-06 04:23:21 +00:00
public-glueops-renovatebot[bot]
6b824769ba feat: update github.com/swaggo/swag to v1.9.0 #minor (#235)
Co-authored-by: public-glueops-renovatebot[bot] <186083205+public-glueops-renovatebot[bot]@users.noreply.github.com>
2025-11-06 04:19:50 +00:00
10 changed files with 47 additions and 36 deletions

View File

@@ -1,7 +1,7 @@
#################################
# Builder: Go + Node in one
#################################
FROM golang:1.25.3-alpine@sha256:aee43c3ccbf24fdffb7295693b6e33b21e01baec1b2a55acc351fde345e9ec34 AS builder
FROM golang:1.25.4-alpine@sha256:d2ede9f3341a67413127cf5366bb25bbad9b0a66e8173cae3a900ab00e84861f AS builder
RUN apk add --no-cache \
bash git ca-certificates tzdata \

View File

@@ -28,8 +28,8 @@ SDK_PKG ?= ${BIN} # package name inside the SDK
UI_SSG_ROUTES ?= /,/login,/docs,/pricing
# Go versioning (go.mod uses major.minor; youre on 1.25.3)
GO_VERSION ?= 1.25.3
# Go versioning (go.mod uses major.minor; youre on 1.25.4)
GO_VERSION ?= 1.25.4
# SDK / package settings (TypeScript)
SDK_TS_OUTDIR ?= sdk/ts

2
go.mod
View File

@@ -1,6 +1,6 @@
module github.com/glueops/autoglue
go 1.25.3
go 1.25.4
require (
github.com/alexedwards/argon2id v1.0.0

View File

@@ -49,7 +49,7 @@ func SecurityHeaders(next http.Handler) http.Handler {
"default-src 'self'",
"base-uri 'self'",
"form-action 'self'",
"script-src 'self'",
"script-src 'self' 'unsafe-inline'",
"style-src 'self' 'unsafe-inline' https://fonts.googleapis.com",
"img-src 'self' data: blob:",
"font-src 'self' data: https://fonts.gstatic.com",

View File

@@ -28,6 +28,7 @@ type Config struct {
Env string
Debug bool
Swagger bool
SwaggerHost string
}
var (
@@ -52,6 +53,7 @@ func Load() (Config, error) {
v.SetDefault("env", "development")
v.SetDefault("debug", false)
v.SetDefault("swagger", false)
v.SetDefault("swagger.host", "localhost:8080")
// Env setup and binding
v.SetEnvKeyReplacer(strings.NewReplacer(".", "_"))
@@ -73,6 +75,7 @@ func Load() (Config, error) {
"env",
"debug",
"swagger",
"swagger.host",
}
for _, k := range keys {
_ = v.BindEnv(k)
@@ -96,6 +99,7 @@ func Load() (Config, error) {
Env: v.GetString("env"),
Debug: v.GetBool("debug"),
Swagger: v.GetBool("swagger"),
SwaggerHost: v.GetString("swagger.host"),
}
// Validate

View File

@@ -62,6 +62,9 @@ func ListPublicSshKeys(db *gorm.DB) http.HandlerFunc {
return
}
if out == nil {
out = []dto.SshResponse{}
}
utils.WriteJSON(w, http.StatusOK, out)
}
}

11
main.go
View File

@@ -1,6 +1,12 @@
package main
import "github.com/glueops/autoglue/cmd"
import (
"os"
"github.com/glueops/autoglue/cmd"
"github.com/glueops/autoglue/docs"
"github.com/joho/godotenv"
)
// @title AutoGlue API
// @version 1.0
@@ -10,7 +16,6 @@ import "github.com/glueops/autoglue/cmd"
// @BasePath /api/v1
// @schemes http https
// @host localhost:8080
// @securityDefinitions.apikey BearerAuth
// @in header
@@ -33,5 +38,7 @@ import "github.com/glueops/autoglue/cmd"
// @description Org-level secret
func main() {
_ = godotenv.Load()
docs.SwaggerInfo.Host = os.Getenv("SWAGGER_HOST")
cmd.Execute()
}

View File

@@ -1,4 +1,4 @@
FROM postgres:latest@sha256:feff5b24fedd610975a1f5e743c51a4b360437f4dc3a11acf740dcd708f413f6
FROM postgres:17.6@sha256:00bc86618629af00d2937fdc5a5d63db3ff8450acf52f0636ec813c7f4902929
RUN cd /var/lib/postgresql/ && \
openssl req -new -text -passout pass:abcd -subj /CN=localhost -out server.req -keyout privkey.pem && \

View File

@@ -16,6 +16,6 @@
"prepare": "npm run build"
},
"devDependencies": {
"typescript": "^4.0 || ^5.0"
"typescript": "5.9.3"
}
}

View File

@@ -307,7 +307,7 @@ export const SshPage = () => {
<TableHeader>
<TableRow>
<TableHead>Name</TableHead>
<TableHead className="min-w-[360px]">Public Key</TableHead>
<TableHead>Public Key</TableHead>
<TableHead>Fingerprint</TableHead>
<TableHead>Created</TableHead>
<TableHead className="w-[160px] text-right">Actions</TableHead>
@@ -320,14 +320,12 @@ export const SshPage = () => {
return (
<TableRow key={k.id}>
<TableCell className="font-medium">{k.name || "—"}</TableCell>
<TableCell className="max-w-[560px] truncate">
<div className="flex items-start gap-2">
<TableCell>
<Tooltip>
<TooltipTrigger asChild>
<Badge variant="secondary" className="whitespace-nowrap">
{keyType}
</Badge>
<Tooltip>
<TooltipTrigger asChild>
<span className="font-mono text-xs">{truncated}</span>
</TooltipTrigger>
<TooltipContent className="max-w-[70vw]">
<div className="max-w-full">
@@ -335,7 +333,6 @@ export const SshPage = () => {
</div>
</TooltipContent>
</Tooltip>
</div>
</TableCell>
<TableCell className="font-mono text-xs">{k.fingerprint}</TableCell>
<TableCell>
@@ -352,14 +349,14 @@ export const SshPage = () => {
<TableCell className="space-x-2 text-right">
<Button
size="sm"
variant="ghost"
variant="outline"
onClick={() => copy(k.public_key ?? "", "Public key copied")}
>
Copy Pub
</Button>
<Button
size="sm"
variant="ghost"
variant="outline"
onClick={() => copy(k.fingerprint ?? "", "Fingerprint copied")}
>
Copy FP