meshery / meshery-adapter-library

Library of common functionality for Meshery Adapters
Apache License 2.0
28 stars 32 forks source link

Fix client creation error when one of the auth infos are invalid #31

Closed tangledbytes closed 3 years ago

tangledbytes commented 3 years ago

Signed-off-by: Utkarsh Srivastava srivastavautkarsh8097@gmail.com

Description This PR fixes https://github.com/layer5io/meshery/issues/2134

This PR adds a filtering function which removes invalid authentication infos from he kubeconfig. It will now fail iff all of the auth infos turn out to be invalid.

Notes for Reviewers This fix is added here because the issue is that certificate files may be accessible to the meshery server but may not be accessible to the meshery adapters hence the error would arise again. Filtering the kubeconfig within the adapters will allow each adapter to individually verify if the certificates are accessible to it or not.

Signed commits

tangledbytes commented 3 years ago

@leecalcote, @kumarabd please review. Can't seem to request review in this repository.

leecalcote commented 3 years ago

I will make an adapter library release and upgrade one of the affected adapters as a test.