Categorygithub.com/Gaardsholt/pass-along
modulepackage
0.7.1
Repository: https://github.com/gaardsholt/pass-along.git
Documentation: pkg.go.dev

# README

Pass-along

OpenSSF Best Practices

The main application uses port 8080.

/healthz and /metrics endpoints uses port 8888.

Server config

The following config can be set via environment variables

TablesRequiredDefault
SERVER_SALT
DATABASE_TYPEin-memory
REDIS_SERVERlocalhost
REDIS_PORT6379
SERVER_PORT8080
HEALTH_PORT8888
LOG_LEVELinfo
VALID_FOR_OPTIONS3600,7200,43200,86400

SERVER_SALT

For extra security you can add your own salt when encrypting the data.

DATABASE_TYPE

Can either be in-memory or redis.

REDIS_SERVER

Address to your redis server.

REDIS_PORT

Used to specify the port your redis server is using.

SERVER_PORT

Listen port for api and ui endpoint.

HEALTH_PORT

Listen port for health endpoint, used mainly for liveness probes.

LOG_LEVEL

Used to specify loglevels, valid values are: debug, info, warn and error

VALID_FOR_OPTIONS

Which options are available in the UI for secret expiration.

Create a new secret

curl --request POST \
  --url http://localhost:8080/api \
  --header 'Content-Type: application/json' \
  --data '{
	"content": "some super secret stuff goes here",
	"expires_in": 10
}'

expires_in is number of seconds until it expires.

The reponse will be the ID of your secret, which can be used to fetch it again.

Fetch a secret

To fetch you secret again to a GET request to http://localhost:8080/api/<your-secret-id-goes-here>

For example:

curl --request GET \
  --url http://localhost:8080/api/Jsm9nDvKVhtAQEfz1Bukx7jHeKIBpPV8kX0B_a4w2rEqAke0MYJ_uvGc30s6o85TiIn-qeBm_9S55ajlDzysRw

# Packages

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author