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

No logging information on token verification process #28

Open
andreaceccanti opened this issue Apr 9, 2020 · 2 comments
Open

No logging information on token verification process #28

andreaceccanti opened this issue Apr 9, 2020 · 2 comments

Comments

@andreaceccanti
Copy link

The scitokens-cpp library provides no logging about the reasons behind a token verification failure. This makes debugging authorization problems complex.

@bbockelm
Copy link
Contributor

@djw8605 - can you take a look at this?

I believe, for the Python library, we hooked into the underlying standard Python logging system. Perhaps we can ask users to provide a callback that they implement (and ship a default to log to stdout)?

@djw8605
Copy link
Contributor

djw8605 commented Apr 14, 2020

The functions themselves provide error text as a returned string. For example:

int scitoken_deserialize(const char *value, SciToken *token, char const* const* allowed_issuers, char **err_msg);

The error is returned in the error_msg variable. You are correct, the library doesn't log anything to stdout, but it does provide error messages back to the calling code.

We could ship the log to stdout? Or, we can rely on the calling code to log the errors, as we do in xrootd-scitokens:

https://github.com/scitokens/xrootd-scitokens/blob/124062e496def27bd7d47be2ff8853458236f2c8/src/scitokens.cpp#L353-L360

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

No branches or pull requests

3 participants