Documentation Question / Integration with Evaluate STIG #1047
Replies: 2 comments 2 replies
-
That's a question that should be geared towards them. STIG Manager being an API means that it's meant to be interfaced to by outside applications, and how those applications choose to do it is up to them. With that said I had my own personal interest in this and tackled it myself. Make sure you review the JWT creation process to create a token (there's a link to a youtube video detailing this in the STIGMAN Watcher repository's wiki. The options in KeyCloak shifted around a bit since then, but ultimately all you have to do is enable authentication, disable authorization and only select service accounts). Note that your account name for grants will be They're defined within the preferences.xml file which is now bundled with Evaluate-STIG. The STIGManagerKey references a key defined within the Preferences File. That key has attributes that define what API to access, where to authenticate against, who to authenticate as, and with what certificate you'll present for authentication. Finally, it allows you to define what collection you'll import into. Below is what one of my entries looks like:
Going back to the above for a second, within STIG Manager itself, I've given Note that "SMImport_CLIENT_KEY" expects a private key file to be present. I haven't been able to get that function to work properly. If you instead export the .p12 JWT token and then run "openssl pksc12 -in myCertificate.p12 -out myUnsafeUnencryptedCertificate.pem -nodes", you'll be able to get your configuration working by leaving CLIENT_KEY as null and then referencing "myUnsafeUnencryptedCertificate.pem" for your CLIENT_PEM attribute. When running Evaluate-STIG, for the configuration above, you would use ".\Evaluate-STIG.ps1 -ComputerList $myServers -STIGManager". Since the key above is named default, it is assumed that the key is what you use. In my example, 11 is my "test" collection I used for setting this up. Yours will obviously vary. If you want to import to different collections, you could create different keys. Example:
With those two keys defined, I could do something like this:
For STIGManagerPassphrase, it's used to decrypt a private key presented to it in the Client_Key section. Unfortunately, I have not been able to get it to work. The STIGMaster module it is called from generates the certificate like so:
The method it calls from appears to be exclusive to PowerShell 7 (which explains the requirement for it in EvaluateSTIG). If I run the following:
Both certificates return as being identical to each other, but if I attempt to use cert.pem with key.pem and my highly confidential passphrase of 1234, it fails, whereas if I just use insecureCert.pem, it works. I'm not sure if I'm missing something obvious or if this is a bug, but I'm currently forced to use a raw, unencrypted private key. I've tried with both PowerShell 7.3.3 and 7.3.6 but no luck. |
Beta Was this translation helpful? Give feedback.
-
Hi @ZacharyLemoine Thanks for helping @jeremyatourville out! We do have contact with the Eval STIG team, but I don't use the tool myself so I'm not familiar with its intricacies. I created issue 1185 on their Navy Spork Repo asking them to add a bit more guidance on the new feature, and referencing this discussion. @ZacharyLemoine If you have access to Spork, you might want to create an issue yourself about the encrypted cert and private key issues you mentioned! Thanks again! |
Beta Was this translation helpful? Give feedback.
-
A new version of Evaluate STIG is available and it now integrates with STIG Manager by allowing the data to be automatically uploaded.
See references here:
https://spork.navsea.navy.mil/nswc-crane-division/evaluate-stig/-/releases
Where are the options for ?:
Where are these set within the STIG Manager application?
It sounds like these are references to certificates..... but I could be wrong. Any suggestions here? Thanks!
Beta Was this translation helpful? Give feedback.
All reactions