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

Feature Request: Allow Autopkg Processors to extend curl options #109

Open
WardsParadox opened this issue Jun 27, 2023 · 7 comments
Open
Labels
enhancement New feature or request

Comments

@WardsParadox
Copy link
Contributor

The current implementation does not allow for extending curl options down to the CURL call. This prevents us from specifying additional options (like a cookie jar) to attach to the curl call to pass through our federated access.

Initial thoughts are to support recipe options or a preference array of the options to pull into every jamf-upload run to extend the internal curl calls.

If this can be specified now, I haven't been able to find that in the code as a way around it via recipe or override.

@grahampugh
Copy link
Owner

It cannot be specified now. It's also something I would not be able to test since we don't have any special federated access. If you can give me an example of what sort of curl options you typically pass in other AutoPkg recipes to make them work, that might help.

@grahampugh grahampugh added the enhancement New feature or request label Jun 27, 2023
@WardsParadox
Copy link
Contributor Author

Normally I pass something like ['--cookie-jar', '~/.tool/cookie'] where our internal CLI auth tool writes the cookie jar.

@grahampugh
Copy link
Owner

The cookie-jar is pre-defined in JamfUploader, and is used to ensure that you get a consistent cluster node behind the scenes which is essential when running multiple, co-dependent API calls in quick succession. If you overwrote it with your own you would probably break it.

@WardsParadox
Copy link
Contributor Author

Sorry correction, we have a cookie file, not a cookie jar. My mistakes. Being able to specify an additional cookie would be tremendously helpful.

@grahampugh
Copy link
Owner

I don't know enough about curl off the bat to known if you can supply multiple cookie files. I use --cookie and --cookie-jar, as these work as read and write options as far as I can tell. See https://github.com/grahampugh/jamf-upload/blob/main/JamfUploaderProcessors/JamfUploaderLib/JamfUploaderBase.py#L371-L387

@WardsParadox
Copy link
Contributor Author

I just tested, you can indeed specify multiple --cookie files.

@WardsParadox
Copy link
Contributor Author

Since this will pull in via recipe override or preferences, thoughts on making this a preference level like JU_CURL_OPTS? Can be specified as either a preference or an override variable since we're just pulling those in via self.env.get?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants