Azure / Azure/typespec-azure

Add a typespec linter to detect use of ApiKey (as an insecure auth mechanism) and warn to discourage use in greenfield services

Open
#2,128 0 comments 0 reactions 0 assignees View on GitHub
feature lib:azure-core linter
Dominant language
TypeScript
Stars
27
Forks
90
Avg merge
1d 21h
Merged PRs (30d)
164

Description

[SFI - Safe Secret Standards](https://eng.ms/docs/products/onecert-certificates-key-vault-and-dsms/key-vault-dsms/certandsecretmngmt/get-started) recommends we discourage the use of ApiKey, connection string, etc. for authentication and instead promote the more secure EntraID/ManagedIdentity as the primary auth mechanisms for services.

A linter to detect and warn for such usage would help service teams.

An example of this is in AppConfig (which is a brownfield service, which needs to keep that auth mechanism for backwards compat):
https://github.com/Azure/azure-rest-api-specs/blob/84f223e8bea800a1a0b503b8c28675abf91f92a2/specification/appconfiguration/AppConfiguration/main.tsp#L14-L22

cc @allenjzhang, @markcowl, @scottaddie

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the linked AppConfiguration/main.tsp example, especially lines 14–22, and the Safe Secret Standards guidance. Define how the linter should identify ApiKey and related insecure authentication usage, how it should warn for greenfield services, and how brownfield compatibility cases should be handled; done means the behavior is specified and validated against the example.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
security, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.