Skip to content
This repository was archived by the owner on Jun 4, 2024. It is now read-only.
Merged
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
7 changes: 2 additions & 5 deletions Makefile
Comment thread
reedloden marked this conversation as resolved.
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,9 @@ access-msteams:
access-pagerduty:
$(MAKE) -C access/pagerduty

.PHONY: access-example
access-example:
go build -o build/access-example ./access/example

.PHONY: access-email
access-email:
go build -o build/access-email ./access/email
$(MAKE) -C access/email

# Build specific access plugin with docker
.PHONY: docker-build-access-%
Expand Down Expand Up @@ -288,6 +284,7 @@ update-goversion:
$(SED) '2s/.*/GO_VERSION=$(GOVERSION)/' access/pagerduty/Makefile
$(SED) '2s/.*/GO_VERSION=$(GOVERSION)/' access/email/Makefile
$(SED) '2s/.*/GO_VERSION=$(GOVERSION)/' event-handler/Makefile
$(SED) '2s/.*/GO_VERSION=$(GOVERSION)/' event-handler/build.assets/Makefile
$(SED) 's/^RUNTIME ?= go.*/RUNTIME ?= go$(GOVERSION)/' docker/Makefile
$(SED) 's/Setup Go .*/Setup Go $(GOVERSION)/g' .github/workflows/unit-tests.yaml
$(SED) 's/Setup Go .*/Setup Go $(GOVERSION)/g' .github/workflows/terraform-tests.yaml
Expand Down
9 changes: 0 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,6 @@ which can be used for writing plugins. More info can be found in
[access/README.md](./access/README.md), including instructions on how to
properly provision necessary certificates.

### API Example

The [access/example](./access/example) plugin automatically approves access
requests based on a user whitelist. This is a good place to start if you are
trying to understand how to use the [`access`](./access) API.

Use `make access-example` to build the plugin and
`./build/access-example configure` to print out a sample configuration file.

### Slack

[See setup instructions on Teleport's website](https://goteleport.com/docs/access-controls/access-request-plugins/ssh-approval-slack/)
Expand Down
2 changes: 1 addition & 1 deletion access/discord/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ GITTAG=v$(VERSION)
GITREF ?= $(shell git describe --dirty --long --tags --match '*discord*')
ADDFLAGS ?=
BUILDFLAGS ?= $(ADDFLAGS) -ldflags "-w -s -X main.Gitref=$(GITREF) -X main.Version=$(VERSION)"
CGOFLAG ?= CGO_ENABLED=1
CGOFLAG ?= CGO_ENABLED=0

OS ?= $(shell go env GOOS)
ARCH ?= $(shell go env GOARCH)
Expand Down
2 changes: 1 addition & 1 deletion access/email/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ GITTAG=v$(VERSION)
GITREF ?= $(shell git describe --dirty --long --tags --match '*email*')
ADDFLAGS ?=
BUILDFLAGS ?= $(ADDFLAGS) -ldflags "-w -s -X main.Gitref=$(GITREF) -X main.Version=$(VERSION)"
CGOFLAG ?= CGO_ENABLED=1
CGOFLAG ?= CGO_ENABLED=0

OS ?= $(shell go env GOOS)
ARCH ?= $(shell go env GOARCH)
Expand Down
2 changes: 1 addition & 1 deletion access/jira/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ GITTAG=v$(VERSION)
GITREF ?= $(shell git describe --dirty --long --tags --match '*jira*')
ADDFLAGS ?=
BUILDFLAGS ?= $(ADDFLAGS) -ldflags "-w -s -X main.Gitref=$(GITREF) -X main.Version=$(VERSION)"
CGOFLAG ?= CGO_ENABLED=1
CGOFLAG ?= CGO_ENABLED=0

OS ?= $(shell go env GOOS)
ARCH ?= $(shell go env GOARCH)
Expand Down
2 changes: 1 addition & 1 deletion access/mattermost/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ GITTAG=v$(VERSION)
GITREF ?= $(shell git describe --dirty --long --tags --match '*mattermost*')
ADDFLAGS ?=
BUILDFLAGS ?= $(ADDFLAGS) -ldflags "-w -s -X main.Gitref=$(GITREF) -X main.Version=$(VERSION)"
CGOFLAG ?= CGO_ENABLED=1
CGOFLAG ?= CGO_ENABLED=0

OS ?= $(shell go env GOOS)
ARCH ?= $(shell go env GOARCH)
Expand Down
2 changes: 1 addition & 1 deletion access/msteams/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ GITTAG=v$(VERSION)
GITREF ?= $(shell git describe --dirty --long --tags --match '*msteams*')
ADDFLAGS ?=
BUILDFLAGS ?= $(ADDFLAGS) -ldflags "-w -s -X main.Gitref=$(GITREF) -X main.Version=$(VERSION)"
CGOFLAG ?= CGO_ENABLED=1
CGOFLAG ?= CGO_ENABLED=0

OS ?= $(shell go env GOOS)
ARCH ?= $(shell go env GOARCH)
Expand Down
2 changes: 1 addition & 1 deletion access/pagerduty/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ GITTAG=v$(VERSION)
GITREF ?= $(shell git describe --dirty --long --tags --match '*pagerduty*')
ADDFLAGS ?=
BUILDFLAGS ?= $(ADDFLAGS) -ldflags "-w -s -X main.Gitref=$(GITREF) -X main.Version=$(VERSION)"
CGOFLAG ?= CGO_ENABLED=1
CGOFLAG ?= CGO_ENABLED=0

OS ?= $(shell go env GOOS)
ARCH ?= $(shell go env GOARCH)
Expand Down
2 changes: 1 addition & 1 deletion access/slack/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ GITTAG=v$(VERSION)
GITREF ?= $(shell git describe --dirty --long --tags --match '*slack*')
ADDFLAGS ?=
BUILDFLAGS ?= $(ADDFLAGS) -ldflags "-w -s -X main.Gitref=$(GITREF) -X main.Version=$(VERSION)"
CGOFLAG ?= CGO_ENABLED=1
CGOFLAG ?= CGO_ENABLED=0

OS ?= $(shell go env GOOS)
ARCH ?= $(shell go env GOARCH)
Expand Down
4 changes: 2 additions & 2 deletions event-handler/build.assets/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ARG GO_VER
FROM golang:${GO_VER}-bookworm
ARG GO_VERSION
FROM golang:${GO_VERSION}-bookworm

ARG UID
ARG GID
Expand Down
8 changes: 4 additions & 4 deletions event-handler/build.assets/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ LOCALDIR := $(dir $(CURDIR)/$(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST)))
TOP ?= $(abspath $(LOCALDIR)/../..)
SRCDIR=/go/src/github.com/gravitational/teleport-plugins/event-handler
VERSION=0.0.1
CGOFLAG ?= CGO_ENABLED=1
CGOFLAG ?= CGO_ENABLED=0
BUILDDIR=$(TOP)/build
OS ?= $(shell go env GOOS)
ARCH ?= $(shell go env GOARCH)
Expand All @@ -19,18 +19,18 @@ DOCKERFLAGS := --rm \

BUILDFORHOST := -e OS=$(OS) \
-e ARCH=$(ARCH) \
-e CGOFLAG="CGO_ENABLED=0"
-e CGOFLAG=$(CGOFLAG)

DOCKERPULLFLAGS ?= --pull
GO_VER = 1.18
GO_VERSION = 1.21.1

NOROOT=-u $$(id -u):$$(id -g)
BINDIR=/usr/local/bin

.PHONY: buildbox
buildbox:
docker build \
--build-arg GO_VER=$(GO_VER) \
--build-arg GO_VERSION=$(GO_VERSION) \
--build-arg UID=$(shell id -u) \
--build-arg GID=$(shell id -g) \
--build-arg ARCH=$(ARCH) \
Expand Down