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

Bring audit to monorepo #3288

Merged
merged 6 commits into from
Mar 10, 2022
Merged

Conversation

kobergj
Copy link
Collaborator

@kobergj kobergj commented Mar 8, 2022

Signed-off-by: jkoberg jkoberg@owncloud.com

Description

Audit service may now live in shiny mono repo

Motivation and Context

Less maintenance when in monorepo

How Has This Been Tested?

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests only (no source changes)

Checklist:

  • Code changes
  • Unit tests added
  • Acceptance tests added
  • Documentation ticket raised:

Signed-off-by: jkoberg <jkoberg@owncloud.com>
@update-docs
Copy link

update-docs bot commented Mar 8, 2022

Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes.

@kobergj kobergj changed the title initial draft Bring audit to monorepo Mar 8, 2022
Signed-off-by: jkoberg <jkoberg@owncloud.com>
Signed-off-by: jkoberg <jkoberg@owncloud.com>
Signed-off-by: jkoberg <jkoberg@owncloud.com>
Signed-off-by: jkoberg <jkoberg@owncloud.com>
@kobergj kobergj marked this pull request as ready for review March 9, 2022 09:11
audit/pkg/config/config.go Outdated Show resolved Hide resolved
audit/pkg/config/debug.go Outdated Show resolved Hide resolved
ocis/pkg/runtime/service/service.go Outdated Show resolved Hide resolved
Signed-off-by: jkoberg <jkoberg@owncloud.com>
@sonarcloud
Copy link

sonarcloud bot commented Mar 9, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

1.2% 1.2% Coverage
18.2% 18.2% Duplication

@kobergj kobergj requested a review from wkloucek March 9, 2022 10:43
Usage: "Check health status",
Action: func(c *cli.Context) error {
// Not implemented
return nil
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we 1) either give a basic health status back or 2) create a ticket to implement it in a separate task

Usage: "print the version of this binary and the running extension instances",
Category: "info",
Action: func(c *cli.Context) error {
// not implemented
Copy link
Contributor

Choose a reason for hiding this comment

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

same here


// Auditlog holds audit log information
type Auditlog struct {
LogToConsole bool `ocisConfig:"log_to_console" env:"AUDIT_LOG_TO_CONSOLE" desc:"logs to Stdout if true"`
Copy link
Contributor

Choose a reason for hiding this comment

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

Are these two Options exclusive or can both be set to true?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

both can be set to true

LogToConsole bool `ocisConfig:"log_to_console" env:"AUDIT_LOG_TO_CONSOLE" desc:"logs to Stdout if true"`
LogToFile bool `ocisConfig:"log_to_file" env:"AUDIT_LOG_TO_FILE" desc:"logs to file if true"`
FilePath string `ocisConfig:"filepath" env:"AUDIT_FILEPATH" desc:"filepath to the logfile. Mandatory if LogToFile is true"`
Format string `ocisConfig:"format" env:"AUDIT_FORMAT" desc:"log format. using json is advised"`
Copy link
Contributor

Choose a reason for hiding this comment

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

Which other options besides json are possible?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

At the moment none. But I figured it be beneficial to have it configurable. I can remove and hardcode it if you say thats too confusing.

Copy link
Contributor

@micbar micbar left a comment

Choose a reason for hiding this comment

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

Some minor questions.

@wkloucek wkloucek merged commit 4017d20 into owncloud:master Mar 10, 2022
ownclouders pushed a commit that referenced this pull request Mar 10, 2022
Merge: 3e2d158 cb5e38f
Author: Willy Kloucek <34452982+wkloucek@users.noreply.github.com>
Date:   Thu Mar 10 09:37:59 2022 +0100

    Merge pull request #3288 from kobergj/BringAuditToMonorepo

    Bring audit to monorepo
@kobergj kobergj deleted the BringAuditToMonorepo branch March 10, 2022 08:47
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.

3 participants