Azure / Azure/azure-cli-extensions

[aks-preview] Check for kube config doesn't properly handle symlinks

Open
#1,525 4 comments 0 reactions 0 assignees View on GitHub
AKS extension/aks-preview Service Attention
Dominant language
Python
Stars
454
Forks
1.7k
Avg merge
2d 19h
Merged PRs (30d)
64

Description

### Extension name (the extension in question)
`aks-preview`

### Description of issue (in as much detail as possible)

The check for the file permissions on `.kube/config` don't properly account for the file being a symlink. Symlinks themselves don't have permissions so it would be important to follow the symlink if it exists and check for the actual file, otherwise this check fails erroneously:
https://github.com/Azure/azure-cli-extensions/blob/9a809ebcada690b29ccacf59169f562fb6101a5d/src/aks-preview/azext_aks_preview/custom.py#L2532-L2535

Contributor guide

Open the contributing guide

Research direction

Start in src/aks-preview/azext_aks_preview/custom.py at lines 2532-2535, linked in the issue, and inspect how the .kube/config permission check handles symlinks. Confirm the check examines the actual target file when .kube/config is a symlink, so valid configurations no longer fail erroneously.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.