https://github.com/hmdsefi/athenz-agent
Athenz-Agent is a sidecar agent that wraps both ZPE and ZPU to facilitate development. It helps developers to concentrate on their software and use Athenz service with ease.
https://github.com/hmdsefi/athenz-agent
athenz athenz-agent sidecar-agent sidecar-container yahoo yahoo-athenz zms-server zpu
Last synced: 3 months ago
JSON representation
Athenz-Agent is a sidecar agent that wraps both ZPE and ZPU to facilitate development. It helps developers to concentrate on their software and use Athenz service with ease.
- Host: GitHub
- URL: https://github.com/hmdsefi/athenz-agent
- Owner: hmdsefi
- License: mit
- Created: 2021-03-31T21:22:59.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2021-04-13T00:11:13.000Z (about 5 years ago)
- Last Synced: 2024-06-19T16:32:36.699Z (almost 2 years ago)
- Topics: athenz, athenz-agent, sidecar-agent, sidecar-container, yahoo, yahoo-athenz, zms-server, zpu
- Language: Go
- Homepage:
- Size: 186 KB
- Stars: 12
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://travis-ci.com/hamed-yousefi/athenz-agent)
[](https://codecov.io/gh/hamed-yousefi/athenz-agent)
[](https://goreportcard.com/report/github.com/hamed-yousefi/athenz-agent)
[](https://app.fossa.com/projects/custom%2B24403%2Fgithub.com%2Fhamed-yousefi%2Fathenz-agent?ref=badge_shield)
### Athenz Sidecar Agent
You're a Yahoo Athenz fan, so this app is created for you. `athenz-agent` contains athenz ZPE and ZPU utilities in Go language.
ZPU will download the domains' policy files and store
them into the filesystem. In other side, ZPE will use that policy files, and it will cache them into memory to use them as
fast as possible.

Athenz agent exposes two APIs:
- CheckAccessWithToken
- GetServiceToken
**CheckAccessWithToken:** Accepts three arguments including client service RoleToken, provider service access,
and provider service resource.
**GetServiceToken:** Has no input argument. It returns RoleToken az result.
### How to install
For using Makefile you must edit this file and change some variables as you want.
* Set `BUILDPATH` to any directory that you want build this project into:
```
BUILDPATH=/home/athenz/sidecar
```
* Set ZMS url to `URL` variable:
```
URL=https://localhost:4443/
```
* You need to use `athenz-conf` utility to get `athenz.conf` file from ZMS server. To do that first you need to add ZMS
server cert file to your local machine `/etc/ssl/certs` folder and run `sudo c_rehash`. Now you can set `athenz-conf` executable file directory
to `ATHENZCONF` variable:
```
ATHENZCONF=/home/athenz/athenz-zms-1.8.10/bin/linux
```
* Use `make sync` command to get all project dependencies.
* Now you can build the project with `make build` command in command line.
* Run project with this command:
```bash
cd $(BUILDPATH) && ./athenz-agent
```
### Configuration
All default configuration files placed in `build/config` path.
## License
MIT License, please see [LICENSE](https://github.com/hamed-yousefi/athenz-agent/blob/master/LICENSE) for details.