Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/actions/repo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ <h1>authentik Platform packages</h1>
<div class="section-a">
<h2>Desktop packages</h2>
<ul>
<li><a href="packages/authentik_macos-15_agent/agent_local/authentik agent installer.pkg">macOS</a></li>
<li><a href="packages/authentik_windows-2025_agent/agent_local/agent.msi">Windows</a></li>
<li><a href="packages/authentik_macos-15_agent/agent/authentik agent installer.pkg">macOS</a></li>
<li><a href="packages/authentik_windows-2025_agent/agent/agent.msi">Windows</a></li>
</ul>
</div>
<div class="section-b">
Expand Down
2 changes: 1 addition & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"type": "go",
"request": "launch",
"mode": "auto",
"program": "${workspaceFolder}/cmd/agent_local/",
"program": "${workspaceFolder}/cmd/agent/",
"buildFlags": ["-tags=debug"]
},
{
Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ test-integration:
$(MAKE) test TEST_FLAGS=-tags=integration

test-agent:
go run -v ./cmd/agent_local/
go run -v ./cmd/agent/

test-setup:
go run -v ./cmd/cli setup -v http://authentik:9000
Expand Down Expand Up @@ -115,10 +115,10 @@ cli/%:
"$(MAKE)" -C "${TOP}/cmd/cli" $*

sysd/%:
"$(MAKE)" -C "${TOP}/cmd/agent_system" $*
"$(MAKE)" -C "${TOP}/cmd/sysd" $*

agent/%:
"$(MAKE)" -C "${TOP}/cmd/agent_local" $*
"$(MAKE)" -C "${TOP}/cmd/agent" $*

browser-ext/%:
"$(MAKE)" -C "${TOP}/browser-ext/" $*
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ The primary supported development environment is devcontainers included with thi

To build all the packages and install them on the dev container, run `make test-full`

The local agent is required for most testing; create a new terminal and run `./bin/agent_local/ak-agent`.
The local agent is required for most testing; create a new terminal and run `./bin/agent/ak-agent`.

### macOS Dependencies

Expand Down
4 changes: 2 additions & 2 deletions cmd/agent_local/Makefile → cmd/agent/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
include ../../common.mk

TARGET := agent_local
TARGET := agent
ifeq ($(OS),Windows_NT)
BINARY_NAME := ak-agent.exe
else
Expand Down Expand Up @@ -43,7 +43,7 @@ package-darwin: clean build
cp "$(shell grep -Rl io.goauthentik.platform.agent ~/Library/MobileDevice/Provisioning\ Profiles)" "${TOP}/bin/${TARGET}/${MACOS_APP_NAME}/Contents/embedded.provisionprofile"
cp "${TOP}/bin/${TARGET}/${BINARY_NAME}" "${TOP}/bin/${TARGET}/${MACOS_APP_NAME}/Contents/MacOS/"
cp "${TOP}/bin/cli/ak" "${TOP}/bin/${TARGET}/${MACOS_APP_NAME}/Contents/MacOS/"
cp "${TOP}/bin/agent_system/ak-sysd" "${TOP}/bin/${TARGET}/${MACOS_APP_NAME}/Contents/MacOS/"
cp "${TOP}/bin/sysd/ak-sysd" "${TOP}/bin/${TARGET}/${MACOS_APP_NAME}/Contents/MacOS/"
cp "${TOP}/bin/browser_support/ak-browser-support" "${TOP}/bin/${TARGET}/${MACOS_APP_NAME}/Contents/MacOS/ak-browser-support"
ln -s "ak" "${TOP}/bin/${TARGET}/${MACOS_APP_NAME}/Contents/MacOS/ak-vault" || true
cp -R "${TOP}/bin/psso/PSSO.appex" "${TOP}/bin/${TARGET}/${MACOS_APP_NAME}/Contents/PlugIns/PSSO.appex" || true
Expand Down
2 changes: 1 addition & 1 deletion cmd/agent_local/main.go → cmd/agent/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"os"

log "github.com/sirupsen/logrus"
agent "goauthentik.io/platform/pkg/agent_local"
"goauthentik.io/platform/pkg/agent"
systemlog "goauthentik.io/platform/pkg/platform/log"
"goauthentik.io/platform/pkg/platform/pstr"
"goauthentik.io/platform/pkg/shared"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ license: "MIT"
scripts:
postinstall: ./package/linux/postinst.sh
contents:
- src: ../../bin/agent_local/ak-agent
- src: ../../bin/agent/ak-agent
dst: /usr/bin/ak-agent
- src: ./package/linux/etc/systemd/user/ak-agent.service
dst: /etc/systemd/user/ak-agent.service
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@
<CreateFolder Directory="sysd" Subdirectory="runtime" />
<CreateFolder Directory="CommonAppDataFolder" Subdirectory="$(var.Manufacturer)" />
<File Id="ak_sysd"
Source="$(env.ROOT)/bin/agent_system/ak-sysd.exe"
Source="$(env.ROOT)/bin/sysd/ak-sysd.exe"
KeyPath="true" />
<File Id="ak_sysd_config"
Source="$(env.ROOT)/cmd/agent_system/package/windows/config.json" />
Source="$(env.ROOT)/cmd/sysd/package/windows/config.json" />

<RegistryKey Root="HKLM" Key="SYSTEM\CurrentControlSet\Services\EventLog\authentik" />
<util:EventSource Log="authentik"
Expand Down Expand Up @@ -71,7 +71,7 @@
Name="authentik User Service"
EventMessageFile="[System64Folder]EventCreate.exe"/>
<File Id="ak_agent"
Source="$(env.ROOT)/bin/agent_local/ak-agent.exe"
Source="$(env.ROOT)/bin/agent/ak-agent.exe"
KeyPath="true" />
</Component>
<Component Id="cli" Bitness="always64" Directory="cli">
Expand Down
2 changes: 1 addition & 1 deletion cmd/agent_system/Makefile → cmd/sysd/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
include ../../common.mk

TARGET := agent_system
TARGET := sysd
ifeq ($(OS),Windows_NT)
BINARY_NAME := ak-sysd.exe
else
Expand Down
4 changes: 2 additions & 2 deletions cmd/agent_system/main.go → cmd/sysd/main.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package main

import (
agentsystem "goauthentik.io/platform/pkg/agent_system/cli"
"goauthentik.io/platform/pkg/shared"
"goauthentik.io/platform/pkg/sysd/cli"
)

func main() {
shared.Start("ak-platform-agent-system", false, func() {
agentsystem.Execute()
cli.Execute()
})
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ license: "MIT"
scripts:
postinstall: ./package/linux/postinst.sh
contents:
- src: ../../bin/agent_system/ak-sysd
- src: ../../bin/sysd/ak-sysd
dst: /usr/bin/ak-sysd
- src: ./package/linux/usr/lib/systemd/system/ak-sysd.service
dst: /usr/lib/systemd/system/ak-sysd.service
- src: ./package/linux/config.json
dst: /etc/authentik/config.json
type: config
- src: ../../bin/agent_system/completions/agent_system.bash
- src: ../../bin/sysd/completions/sysd.bash
dst: /etc/bash_completion.d/ak-sysd
- dst: /etc/authentik/domains
type: dir
Expand Down
2 changes: 1 addition & 1 deletion common.mk
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ endef

define go_generate_resources
go tool goversioninfo \
-icon="${TOP}/cmd/agent_local/package/windows/resources/icon.ico" \
-icon="${TOP}/cmd/agent/package/windows/resources/icon.ico" \
-company="Authentik Security Inc." \
-copyright="2025 Authentik Security Inc." \
-file-version=${VERSION} \
Expand Down
6 changes: 3 additions & 3 deletions pkg/agent_local/agent.go → pkg/agent/agent.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package agentlocal
package agent

import (
"os"
Expand All @@ -7,8 +7,8 @@ import (

"github.com/nightlyone/lockfile"
log "github.com/sirupsen/logrus"
"goauthentik.io/platform/pkg/agent_local/config"
"goauthentik.io/platform/pkg/agent_local/tray"
"goauthentik.io/platform/pkg/agent/config"
"goauthentik.io/platform/pkg/agent/tray"
"goauthentik.io/platform/pkg/ak/token"
"goauthentik.io/platform/pkg/pb"
systemlog "goauthentik.io/platform/pkg/platform/log"
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (

"github.com/adrg/xdg"
"github.com/fsnotify/fsnotify"
"goauthentik.io/platform/pkg/agent_local/types"
"goauthentik.io/platform/pkg/agent/types"
"goauthentik.io/platform/pkg/storage/cfgmgr"
)

Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions pkg/agent_local/grpc.go → pkg/agent/grpc.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package agentlocal
package agent

import (
"github.com/grpc-ecosystem/go-grpc-middleware/v2/interceptors/logging"
grpc_sentry "github.com/johnbellone/grpc-middleware-sentry"
log "github.com/sirupsen/logrus"
"goauthentik.io/platform/pkg/agent_local/types"
"goauthentik.io/platform/pkg/agent/types"
"goauthentik.io/platform/pkg/pb"
"goauthentik.io/platform/pkg/platform/grpc_creds"
systemlog "goauthentik.io/platform/pkg/platform/log"
Expand Down
2 changes: 1 addition & 1 deletion pkg/agent_local/grpc_auth.go → pkg/agent/grpc_auth.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package agentlocal
package agent

import (
"context"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package agentlocal
package agent

import (
"context"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package agentlocal
package agent

import (
"context"
Expand Down
4 changes: 2 additions & 2 deletions pkg/agent_local/grpc_config.go → pkg/agent/grpc_config.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package agentlocal
package agent

import (
"context"
"maps"

"goauthentik.io/platform/pkg/agent_local/config"
"goauthentik.io/platform/pkg/agent/config"
"goauthentik.io/platform/pkg/pb"
"google.golang.org/protobuf/types/known/emptypb"
)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package agentlocal
package agent

import (
"context"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package agentlocal
package agent

import (
"context"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package agentlocal
package agent

import (
"context"
Expand Down
2 changes: 1 addition & 1 deletion pkg/agent_local/lock.go → pkg/agent/lock.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package agentlocal
package agent

import (
"github.com/adrg/xdg"
Expand Down
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions pkg/agent_local/tray/items.go → pkg/agent/tray/items.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import (
"github.com/cli/browser"
"github.com/kolide/systray"
"github.com/mergestat/timediff"
"goauthentik.io/platform/pkg/agent_local/config"
"goauthentik.io/platform/pkg/agent_system/client"
"goauthentik.io/platform/pkg/agent/config"
"goauthentik.io/platform/pkg/ak/token"
"goauthentik.io/platform/pkg/meta"
"goauthentik.io/platform/pkg/sysd/client"
"google.golang.org/protobuf/types/known/emptypb"
)

Expand Down
4 changes: 2 additions & 2 deletions pkg/agent_local/tray/tray.go → pkg/agent/tray/tray.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (

"github.com/kolide/systray"
log "github.com/sirupsen/logrus"
"goauthentik.io/platform/pkg/agent_local/config"
"goauthentik.io/platform/pkg/agent_local/tray/icon"
"goauthentik.io/platform/pkg/agent/config"
"goauthentik.io/platform/pkg/agent/tray/icon"
systemlog "goauthentik.io/platform/pkg/platform/log"
"goauthentik.io/platform/pkg/shared/events"
"goauthentik.io/platform/pkg/storage/cfgmgr"
Expand Down
File renamed without changes.
26 changes: 0 additions & 26 deletions pkg/agent_system/components_linux.go

This file was deleted.

24 changes: 0 additions & 24 deletions pkg/agent_system/components_windows.go

This file was deleted.

2 changes: 1 addition & 1 deletion pkg/ak/token/exchange.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"net/url"
"strings"

"goauthentik.io/platform/pkg/agent_local/config"
"goauthentik.io/platform/pkg/agent/config"
"goauthentik.io/platform/pkg/ak"
"goauthentik.io/platform/pkg/meta"
systemlog "goauthentik.io/platform/pkg/platform/log"
Expand Down
2 changes: 1 addition & 1 deletion pkg/ak/token/exchange_cached.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package token
import (
"time"

"goauthentik.io/platform/pkg/agent_local/config"
"goauthentik.io/platform/pkg/agent/config"
systemlog "goauthentik.io/platform/pkg/platform/log"
"goauthentik.io/platform/pkg/storage"
)
Expand Down
2 changes: 1 addition & 1 deletion pkg/ak/token/token_multiple.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"sync"

log "github.com/sirupsen/logrus"
"goauthentik.io/platform/pkg/agent_local/config"
"goauthentik.io/platform/pkg/agent/config"
systemlog "goauthentik.io/platform/pkg/platform/log"
"goauthentik.io/platform/pkg/shared/events"
"goauthentik.io/platform/pkg/storage/cfgmgr"
Expand Down
2 changes: 1 addition & 1 deletion pkg/ak/token/token_profile.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"github.com/avast/retry-go/v4"
"github.com/golang-jwt/jwt/v5"
log "github.com/sirupsen/logrus"
"goauthentik.io/platform/pkg/agent_local/config"
"goauthentik.io/platform/pkg/agent/config"
"goauthentik.io/platform/pkg/ak"
systemlog "goauthentik.io/platform/pkg/platform/log"
)
Expand Down
2 changes: 1 addition & 1 deletion pkg/ak/token/token_profile_renew.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"net/url"
"strings"

"goauthentik.io/platform/pkg/agent_local/config"
"goauthentik.io/platform/pkg/agent/config"
"goauthentik.io/platform/pkg/ak"
"goauthentik.io/platform/pkg/meta"
)
Expand Down
2 changes: 1 addition & 1 deletion pkg/ak/urls.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"net/url"

"goauthentik.io/api/v3"
"goauthentik.io/platform/pkg/agent_local/config"
"goauthentik.io/platform/pkg/agent/config"
)

type URLSet struct {
Expand Down
6 changes: 3 additions & 3 deletions pkg/browser_support/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ import (
"context"

log "github.com/sirupsen/logrus"
aclient "goauthentik.io/platform/pkg/agent_local/client"
"goauthentik.io/platform/pkg/agent_local/types"
sclient "goauthentik.io/platform/pkg/agent_system/client"
aclient "goauthentik.io/platform/pkg/agent/client"
"goauthentik.io/platform/pkg/agent/types"
"goauthentik.io/platform/pkg/browser_support/native_messaging"
"goauthentik.io/platform/pkg/pb"
systemlog "goauthentik.io/platform/pkg/platform/log"
sclient "goauthentik.io/platform/pkg/sysd/client"
"google.golang.org/protobuf/types/known/emptypb"
)

Expand Down
Loading
Loading