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

Adding fips compliant agents to Prerelease on demand workflow #1942

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

nr-dadams
Copy link
Collaborator

@nr-dadams nr-dadams commented Oct 25, 2024

  • Adds build mode field for FIPS/Non FIPS
  • New dockerfile for fips compliant building
  • publishes fips compliant agents with '_fips' naming convention

https://new-relic.atlassian.net/browse/NR-268769

@nr-dadams nr-dadams requested a review from a team October 25, 2024 17:42
BUILD_MODE:
description: 'Enable Normal, FIPS or ALL'
required: false
default: '' # "ALL" "FIPS":
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: perhaps using NON-FIPS instad of ' ' as variant for the non fips case

build/ci.mk Outdated
Comment on lines 133 to 134
-v $(CURDIR):/go/src/github.com/newrelic/infrastructure-agent \
-w /go/src/github.com/newrelic/infrastructure-agent \
Copy link
Contributor

Choose a reason for hiding this comment

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

is it needed to place the code here? sounds like the old gopath dance

arch:
- amd64
- arm64
# - arm
Copy link
Contributor

Choose a reason for hiding this comment

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

is it a leftover? perhaps adding a comment

Copy link
Contributor

Choose a reason for hiding this comment

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

same on the others build yamls def

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I've removed these leftover comments

package main

import (
"context"
"flag"
"fmt"
"github.com/newrelic/infrastructure-agent/pkg/ipc"
Copy link
Contributor

Choose a reason for hiding this comment

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

this change looks like a wrong ide config


import (
"context"
_ "crypto/tls/fipsonly"
Copy link
Contributor

Choose a reason for hiding this comment

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

is this the only diff between the two files? did you consider to extract as much as possible from this file into a separate file inside the same package ? or couldn't this dep be added in another file with just the dependency ? The objective would be to avoid code duplication.

Copy link
Contributor

Choose a reason for hiding this comment

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

same comment would apply for the three binaries, i think the most important is the newrelic-infa.go

Copy link
Contributor

Choose a reason for hiding this comment

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

I mean having an extra file fips_deps.go with

//go:build fips

package main

import (
	_ "crypto/tls/fipsonly"
)

Would that work?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thanks for the comment! I've updated the code and files to reflect this

@nr-dadams nr-dadams requested a review from a team as a code owner November 14, 2024 00:00
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.

2 participants