-
Notifications
You must be signed in to change notification settings - Fork 10
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
Implement new 'discover' command #109
base: master
Are you sure you want to change the base?
Conversation
…s known to the API server
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should probably also be able to filter somehow otherwise this would be a crazy call on large deployments.
http.Handle("/scheduleQuery", samlSP.RequireAccount(sq)) | ||
http.Handle("/fetchResults", samlSP.RequireAccount(fr)) | ||
http.Handle("/checkHost", samlSP.RequireAccount(_checkHost)) | ||
http.Handle("/listHosts", _listHosts) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs to be protected by SAML
Any ideas on the parameters this might take? This will be a part of the spec contract a 'goserver'/mock server needs to implement. I'm thinking either a query param for "search" working as a glob search on any of the host fields, or a set of limit + offset parameters. |
@@ -10,6 +10,7 @@ import ( | |||
// is blind to the implementation for code separation purposes. | |||
type GoQueryAPI interface { | |||
CheckHost(string) (hosts.Host, error) | |||
ListHosts() (utils.Rows, error) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason why this is utils.Rows
and not []hosts.Host
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi Zachary, it is because this branch is out of date with master, which recently had the big rewrite
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry I missed the point of your question. No there is no reason, this was implemented as if this function expected the standard query response rows structure from the server. Since it is a specific goquery endpoint then yes, you are right, the shape of returned JSON from the server (or whatever is implementing this) should be of type []hosts.Host
Thanks for the catch, will update
This PR closes #93