FIPS complaint agent file vault#7360
Conversation
|
This pull request does not have a backport label. Could you fix it @michel-laterman? 🙏
|
michel-laterman
left a comment
There was a problem hiding this comment.
This is currently a draft as I need to do testing.
I may need to have a different default salt size for fips/nonfips distributions to start.
My thought is that this approach will give us the ability to migrate from saltSize 8 to 16 which will be useful if customers want to migrate agents (they will need to go from agent version N-1 -> N -> N-fips).
Migration is not part of this PR.
Can you explain this more? Why not just |
I'll admit that i'm not 100% sure on this; I'm assuming that a FIPS agent can not run the migration as it would need to use non-compliant crypto settings in order to do so |
|
Right now the integration tests fail as one of the upgrade tests tries to go from an artifact that is built from this PR to the latest snapshot. The upgraded agent fails to start with |
|
Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane) |
blakerouse
left a comment
There was a problem hiding this comment.
I really want to just understand what happens here so
|
This pull request is now in conflicts. Could you fix it? 🙏 |
blakerouse
left a comment
There was a problem hiding this comment.
With product saying that we don't need an upgrade path then I am good with this PR. I think this decision will be re-visited in the future. I could see an organization with 100+ agents having to re-deploy to get FIPS as being an issue.
I would think we could support upgrade to non-FIPS that adjusts the size of the salt to FIPS compliant, then upgrade to a FIPS compliant binary that is now using the salt. It is interesting topic if a FIPS binary upgrade using non-FIPS compliant path to support an upgrade is not non-FIPS if then it uses FIPS from that upgrade. To me this is an interesting discussion.
|
interestingly enough I do see a CI failure with this error but GH reports no conflicts 🤔 |
simitt
left a comment
There was a problem hiding this comment.
Add elastic file vault seed implementation to allow variable length salt sizes.
.seedV2 files are new; they contain the seed followed by the salt size (as a little endian uint32 value). This allows specify the salt size in use by the agent vault. Used by the FIPS distribution.
I don't see how the vault salt size can be set, it always uses the default of size 16 for fips. It's also not clear to me why it would need to be able to deal with variable salt size?
Looking at the current code, are all these changes really necessary and relevant?
- now that non-fips is unchanged, what is the reasoning behind introducing a
.seedV2file for fips rather than also using the.seedfile? - The only place where I see a salt size before the changes is in
vault_file_notwindows.go. It can easily be that I am overlooking something, so please push back if that is the case, but wouldn't the simplest required change be to only switch thesaltSize=16in this file for thefipscase and keep everything else untouched? Can you elaborate why this wouldn't be sufficient or desired?
|
Going for least lines of (code) change in this case really limits the agent in the future if we ever need to re-visit any of our agent state encryption. Additionally, having an explicit |
|
💚 Build Succeeded
History
|
Add elastic file vault seed implementation to allow variable length salt sizes. FIPS distributions will strictly use the new .seedV2 format with the salt size set to 16 for FIPS compliance. When not in FIPS only the (V1) .seed file is used. (cherry picked from commit 1d5a294)
Add elastic file vault seed implementation to allow variable length salt sizes. FIPS distributions will strictly use the new .seedV2 format with the salt size set to 16 for FIPS compliance. When not in FIPS only the (V1) .seed file is used. (cherry picked from commit 1d5a294)
Add elastic file vault seed implementation to allow variable length salt sizes. FIPS distributions will strictly use the new .seedV2 format with the salt size set to 16 for FIPS compliance. When not in FIPS only the (V1) .seed file is used. (cherry picked from commit 1d5a294) Co-authored-by: Michel Laterman <82832767+michel-laterman@users.noreply.github.com>




What does this PR do?
Add elastic file vault seed implementation to allow variable length salt sizes.
FIPS distributions will strictly use the new
.seedV2format with the salt size set to 16 for FIPS compliance.When not in FIPS only the (V1)
.seedfile is used.Seed file version is as follows:
.seedfiles remain unchanged from the current released implementation. Used in non-FIPS distribution..seedV2files are new; they contain the seed followed by the salt size (as a little endian uint32 value). This allows specify the salt size in use by the agent vault. Used by the FIPS distribution.Why is it important?
Current file vault does not meet FIPS compliance.
Checklist
I have made corresponding changes to the documentationI have made corresponding change to the default configuration files./changelog/fragmentsusing the changelog toolI have added an integration test or an E2E testDisruptive User Impact
No replacement path from a non-FIPS to a FIPS-agent (or vice-versa).