PRP: JDBC secret veles and validator#1774
Conversation
b499625 to
2217a7d
Compare
2217a7d to
2a80f50
Compare
| // Credentials contains an URL with credentials. | ||
| type Credentials struct { | ||
| FullURL string | ||
| IsLocalDB bool |
There was a problem hiding this comment.
Since we can validate only PublicDBs I would rename IsLocalDB to IsPublicDB (and modify the logic accordingly) or something similar.
There was a problem hiding this comment.
I think I explained it here: #1774 (comment)
Local databases are still important, according to this @erikvarga's comment: #1008 (comment)
alessandro-Doyensec
left a comment
There was a problem hiding this comment.
Hello @grandsilva
Thanks for the contribution!
-
Please checkout the comments I left for you to address
-
Remember to add the plugin to the
docs/supported_inventory_types.mdfile. -
Regarding:
Currently, I parsed the JDBC URLS and only extracted hosts in the detector because we only need to determine if the hosts are local or not.
I think it might also make sense to extract credentials in the detection step to be sure they're not empty. This may be redundant with the regex extraction though, so we can discuss it.
|
@alessandro-Doyensec Hi
Extracting secrets here means the URLs, not the credentials of the URLs. |
|
Hello @grandsilva Looking at 285b9f9 I think some changes have not been included: for example I don't see the IsLocalHost function or the IsLocalDB field being renamed. |
|
Note: I suspect that the changes to the |
285b9f9 to
e279df4
Compare
add add the plugin to the docs/supported_inventory_types.md file remove a temp test directory
e279df4 to
0b8ff23
Compare
alessandro-Doyensec
left a comment
There was a problem hiding this comment.
Hello @grandsilva
Thanks for the changes. I left a few comments for you to address.
alessandro-Doyensec
left a comment
There was a problem hiding this comment.
Hello @grandsilva
Thanks for the changes, the PR looks good to me
#1008
I tried to add parsers for all examples of JDBC URLs I could find for MySQL, PostgreSQL, and MSSQL.
Currently, I parsed the JDBC URLS and only extracted hosts in the detector because we only need to determine if the hosts are local or not.
Inside the validate function, the database name and user/pass are extracted.