jborean93 / pykrb5

Python krb5 API interface
MIT License
17 stars 8 forks source link

Add krb5_cc_retrieve_cred() and krb5_cc_remove_cred() #23

Closed steffen-kiess closed 1 year ago

steffen-kiess commented 1 year ago

KRB5_TC_SUPPORTED_KTYPES is not available on heimdal. I've updated the PR to make CredentialsRetrieveFlags.supported_ktypes available only if KRB5_TC_SUPPORTED_KTYPES is available at compile time.

jborean93 commented 1 year ago

https://github.com/jborean93/pykrb5/pull/24 should fix up the CI errors, it seems like Ubuntu 22.04 ships with a version of pip which is incompatible with how we test things. That PR moves the project structure back to using the setup.cfg style project definition which improves compatibility. If you rebase your PR it should pick up those changes for the next run.

Looking at the macOS errors it looks like you need to define the enum in the _ccache.pyi file for mypy to be happy. https://github.com/jborean93/pykrb5/blob/main/src/krb5/_principal.pyi#L9-L24 is how I did it for other enums.

steffen-kiess commented 1 year ago

Any chance on adding actual tests for these new functions?

I can try to do that.

That PR moves the project structure back to using the setup.cfg style project definition which improves compatibility. If you rebase your PR it should pick up those changes for the next run.

Ok, I'll do that.

steffen-kiess commented 1 year ago

I've added a test, and the CI now seems to run through.

jborean93 commented 1 year ago

Thanks for working on this and filling out the tests and typing stuff, appreciate the work.