conan-io / conan

Conan - The open-source C and C++ package manager
https://conan.io
MIT License
8.14k stars 970 forks source link

[question] conan forgets authentication #11056

Closed bukulin closed 2 months ago

bukulin commented 2 years ago

Hi,

I've recently updated conan client to 1.47.0 and jfrog artifactory CE to 7.37.14.

With this setup conan client keeps forgetting authentication to the jfrog artifactory server just in a few hours. With previous versions (conan/1.44.0, artifactory/7.29.8) this time period was around 30 days. Is this behavior expected? If so, how can I extend the timeout?

memsharded commented 2 years ago

Hi @bukulin

This is not related to the Conan client, but to possibly something related to Artifactory. The Conan client never expires the auth tokens, only the server side does that. Maybe some Artifactory resource like this could help: https://www.jfrog.com/confluence/display/JFROG/Access+YAML+Configuration

bukulin commented 2 years ago

Hi @memsharded

Thank you for the clarification!

memsharded commented 2 years ago

No prob, please let us know if you find solution in https://www.jfrog.com/confluence/display/JFROG/Access+YAML+Configuration, or otherwise feel free to re-open or comment and we will try to help. Thanks!

bukulin commented 2 years ago

I've read the documentation and I am uncertain what an "internal" token means. Is that for the authentication among the microservices in the artifactory server OR is that related to the client authentication tokens? Anyways, I've increased the token.default-expiry-internal to 86400 to see what happens next.

I am not sure if I shall change the token.revocation.revocable-expiry-threshold and/or token.persistency.persistent-expiry-threshold.

Regarding the client there is one thing that is a bit surprising to me. Let's assume the following things:

After that, the conan user for my server is bar. It is saved to ~/.conan/.conan.db, and it is showed in the output of conan user command. However, the authentication token to my server does not changed in ~/.conan/.conan.db. Is this OK?

Minimonium commented 2 years ago

Can confirm. After the latest update if I build multiple big dependencies the auth fails mid-flight. Only can be solved by using conan user -c since it says that the user is already authenticated otherwise.

memsharded commented 2 years ago

Yes, this has been confirmed to be an Artifactory 7.37 issue, basically a side effect of a relevant security fix that definitely needed to be fixed. The team is prioritizing and working on it, keep an eye on the next Artifactory releases, a fix will be included. I will also update here when this happens. Thanks very much for your patience.

memsharded commented 2 years ago

The fix has been deployed to Artifactory SaaS instances, so if it is your case, please check and let us know. The on-prem release will follow soon.

AbrilRBS commented 2 months ago

Closed as solved as we didn't hear anything new about the issue in a while, thanks! :)