Support for file store authentication (docker login)#56
Conversation
|
Thanks How to use this to authenticate to OCI registry? Would be nice to have some example (documentation) and ideally integration test (with test container). I'm fine to merge partial implementation, but I think it doesn't solve #15 if we cannot use this new authentication method. |
|
https://github.com/oras-project/oras-java/tree/main/src%2Fmain%2Fjava%2Fland%2Foras%2Fauth I would expect to see a new implementation here. That get the credentials from the file and use it to perform request against the registry |
Sure, i will add, also i have added some test case to verify the loadConfig https://github.com/oras-project/oras-java/pull/56/files#diff-06cef6e45e7cf319c09fb997438c922de0ce1f1b256a09826acb23267dcaaeefR113:~:text=testConfigLoad_success()%20throws-,Exception,-%7B |
|
Thanks. In my opinion adding Jackson dependency is not necessary. We use JSONUtils to serialize object from/to. Internally it used GSON (this might change in the future). What is the reason to add Jackson? Why is a compile scope and not test scope? Thanks |
@jonesbusy Use JSONutils instead of jackson thanks |
|
Do you think we can have a test on https://github.com/oras-project/oras-java/blob/main/src/test/java/land/oras/RegistryTest.java Right now they don't user any authentication, but I would be great to have a test with an existing auth file and ensuring it's read automatically if present. Perhaps it should be the default when we don't provide an authentication to the SDK |
yes, we can create another issue to create test cases for different authentication present in java-sdk, what do you think ? i guess creating another issue make sense |
|
@jonesbusy Added implementation of FileStore, the PR will be very large we can partially merge this what do you think ? |
|
There is no rush to merge this PR. I don't see it as a large PR to read and review It looks better now with AuthProvider but still need some cleanup to remove code duplicate, getter that alter state etc... Thanks for your contribution |
sure, i will add more test case in the registry as well thanks : ) |
Signed-off-by: AayushSaini101 <kumaraayush9810@gmail.com>
Signed-off-by: AayushSaini101 <kumaraayush9810@gmail.com>
Signed-off-by: AayushSaini101 <kumaraayush9810@gmail.com>
Signed-off-by: AayushSaini101 <kumaraayush9810@gmail.com>
Signed-off-by: Valentin Delaye <jonesbusy@users.noreply.github.com> Signed-off-by: AayushSaini101 <kumaraayush9810@gmail.com>
Co-authored-by: Valentin Delaye <jonesbusy@users.noreply.github.com> Signed-off-by: AayushSaini101 <kumaraayush9810@gmail.com>
Signed-off-by: AayushSaini101 <kumaraayush9810@gmail.com>
Signed-off-by: AayushSaini101 <kumaraayush9810@gmail.com>
Signed-off-by: AayushSaini101 <kumaraayush9810@gmail.com>
Signed-off-by: AayushSaini101 <kumaraayush9810@gmail.com>
…ject#86) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: AayushSaini101 <kumaraayush9810@gmail.com>
Signed-off-by: AayushSaini101 <kumaraayush9810@gmail.com>
Signed-off-by: AayushSaini101 <kumaraayush9810@gmail.com>
Signed-off-by: Valentin Delaye <jonesbusy@users.noreply.github.com> Signed-off-by: AayushSaini101 <kumaraayush9810@gmail.com>
Signed-off-by: Valentin Delaye <jonesbusy@users.noreply.github.com> Signed-off-by: AayushSaini101 <kumaraayush9810@gmail.com>
Signed-off-by: Valentin Delaye <jonesbusy@users.noreply.github.com> Signed-off-by: AayushSaini101 <kumaraayush9810@gmail.com>
Signed-off-by: Valentin Delaye <jonesbusy@users.noreply.github.com> Signed-off-by: AayushSaini101 <kumaraayush9810@gmail.com>
Signed-off-by: AayushSaini101 <kumaraayush9810@gmail.com>
Signed-off-by: Valentin Delaye <jonesbusy@users.noreply.github.com> Signed-off-by: AayushSaini101 <kumaraayush9810@gmail.com>
|
Thanks for the effort. LGTM! |
Description
Added new support fetching credentials from file storage.
Explanation: Created a class File Store that helps to store the credentials in the particular config.
Closes #15
Testing done
Added test cases to verify the methods of the class