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(cli): new agent access token command #256

Merged
merged 1 commit into from
Dec 7, 2020

Conversation

afiune
Copy link
Contributor

@afiune afiune commented Dec 7, 2020

New lacework agent command!

$ lacework agent --help
Manage agents and agent access tokens in your account.

To analyze application, host and user behavior, Lacework uses a lightweight agent,
which securely forwards collected metadata to the Lacework cloud for analysis. The
agent requires minimal system resources and runs on most 64-bit Linux distributions.

For a complete list of supported operating systems, visit:

    https://support.lacework.com/hc/en-us/articles/360005230014-Supported-Operating-Systems

Usage:
  lacework agent [command]

Available Commands:
  token       manage agent access tokens

Flags:
  -h, --help   help for agent

Global Flags:
  -a, --account string      account subdomain of URL (i.e. <ACCOUNT>.lacework.net)
  -k, --api_key string      access key id
  -s, --api_secret string   secret access key
      --debug               turn on debug logging
      --json                switch commands output from human-readable to json format
      --nocolor             turn off colors
      --noninteractive      turn off interactive mode (disable spinners, prompts, etc.)
  -p, --profile string      switch between profiles configured at ~/.lacework.toml

Use "lacework agent [command] --help" for more information about a command.

This command contains only one sub-command at the moment, the lacework agent token command to manage agent access tokens. In the future, we are planning to extend this agent command to do other things like list agents, generate deployment scripts, and perhaps even install agents on remote hosts.

tenor-126201367

JIRA: https://lacework.atlassian.net/browse/ALLY-236

Contributes to lacework/terraform-provider-lacework#41

Signed-off-by: Salim Afiune Maya [email protected]

@afiune afiune added feat New feature or request cli Something related to the Lacework CLI api Something related to the Go API client labels Dec 7, 2020
@afiune afiune self-assigned this Dec 7, 2020
assert.NotEmpty(t, token, "check JSON token show response while parsing update time")
assert.True(t,
tokenUpdatedTime.Before(token.LastUpdatedTime),
fmt.Sprintf("the agen access token last_update_time was NOT updated! check please. (old:%s) (new:%s)",
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
fmt.Sprintf("the agen access token last_update_time was NOT updated! check please. (old:%s) (new:%s)",
fmt.Sprintf("the agent access token last_update_time was NOT updated! check please. (old:%s) (new:%s)",

cli/cmd/agent.go Outdated
Comment on lines 45 to 47
To analyze application, host and user behavior, Lacework uses a lightweight agent,
which securely forwards collected metadata to the Lacework cloud for analysis. The
agent requires minimal system resources and runs on most 64-bit Linux distributions.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
To analyze application, host and user behavior, Lacework uses a lightweight agent,
which securely forwards collected metadata to the Lacework cloud for analysis. The
agent requires minimal system resources and runs on most 64-bit Linux distributions.
To analyze application, host, and user behavior, Lacework uses a lightweight agent,
which securely forwards collected metadata to the Lacework cloud for analysis. The
agent requires minimal system resources and runs on most 64-bit Linux distributions.

Copy link
Contributor

Choose a reason for hiding this comment

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

@afiune Did you pull this text from support docs, or was it created new for the CLI?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

@scottford-lw scottford-lw left a comment

Choose a reason for hiding this comment

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

@afiune Great stuff. I had a couple of minor finds, but 👍

New `lacework agent` command!
```
$ lacework agent --help
Manage agents and agent access tokens in your account.

To analyze application, host and user behavior, Lacework uses a lightweight agent,
which securely forwards collected metadata to the Lacework cloud for analysis. The
agent requires minimal system resources and runs on most 64-bit Linux distributions.

For a complete list of supported operating systems, visit:

    https://support.lacework.com/hc/en-us/articles/360005230014-Supported-Operating-Systems

Usage:
  lacework agent [command]

Available Commands:
  token       manage agent access tokens

Flags:
  -h, --help   help for agent

Global Flags:
  -a, --account string      account subdomain of URL (i.e. <ACCOUNT>.lacework.net)
  -k, --api_key string      access key id
  -s, --api_secret string   secret access key
      --debug               turn on debug logging
      --json                switch commands output from human-readable to json format
      --nocolor             turn off colors
      --noninteractive      turn off interactive mode (disable spinners, prompts, etc.)
  -p, --profile string      switch between profiles configured at ~/.lacework.toml

Use "lacework agent [command] --help" for more information about a command.
```

This command contains only one sub-command at the moment, the `lacework
agent token` command to manage agent access tokens. In the future we are
planning to extend this agent command to do other things like, list
agents, generate deployment scripts, and perhaps even install agents on
remote hosts.

JIRA: https://lacework.atlassian.net/browse/ALLY-236

Signed-off-by: Salim Afiune Maya <[email protected]>
@afiune afiune force-pushed the afiune/ALLY-236/agent-tokens branch from d7204d0 to 88192ab Compare December 7, 2020 20:08
@afiune afiune merged commit 7f8ba11 into master Dec 7, 2020
@afiune afiune deleted the afiune/ALLY-236/agent-tokens branch December 7, 2020 20:24
@afiune afiune mentioned this pull request Dec 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api Something related to the Go API client cli Something related to the Lacework CLI feat New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants