Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: create agent api #475

Merged
merged 15 commits into from
Aug 21, 2023
Merged

feat: create agent api #475

merged 15 commits into from
Aug 21, 2023

Conversation

adityathebe
Copy link
Member

Resolves: #465

@adityathebe adityathebe marked this pull request as ready for review August 3, 2023 11:41
@adityathebe adityathebe marked this pull request as draft August 3, 2023 11:43
auth/middleware.go Outdated Show resolved Hide resolved
db/people.go Outdated Show resolved Hide resolved
db/people.go Outdated Show resolved Hide resolved
db/people.go Outdated Show resolved Hide resolved
db/people.go Outdated Show resolved Hide resolved
@@ -124,6 +127,8 @@ func Init(adminUserID string) error {
{RoleResponder, ObjectDatabaseIncident, ActionUpdate},

{RoleViewer, ObjectDatabase, ActionRead},

{RoleAgent, ObjectAgentPush, ActionWrite},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The agent should only have access to call the API that would be used when pushing upstream

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't it already that way?

db/agents.go Show resolved Hide resolved
auth/middleware.go Outdated Show resolved Hide resolved
auth/middleware.go Outdated Show resolved Hide resolved
auth/middleware.go Outdated Show resolved Hide resolved
agent/agent.go Outdated Show resolved Hide resolved
argon2 allows us to supply the salt whereas bcrypt doesn't.
auth/middleware.go Fixed Show fixed Hide fixed
auth/middleware.go Fixed Show fixed Hide fixed
auth/middleware.go Fixed Show fixed Hide fixed
@adityathebe adityathebe marked this pull request as ready for review August 8, 2023 06:01
utils/utils.go Outdated Show resolved Hide resolved
cmd/server.go Outdated Show resolved Hide resolved
@moshloop moshloop merged commit a9f7d84 into main Aug 21, 2023
5 checks passed
@moshloop moshloop deleted the feat/agent-api branch August 21, 2023 09:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create Agent API
3 participants