cloudflare / cloudflare/cloudflared

💡User info subcommand for access CLI

Open
#1,121 0 comments 0 reactions 0 assignees View on GitHub
Priority: Normal Type: Feature Request
Dominant language
Go
Stars
15.6k
Forks
1.4k
PR merge metrics
No merged PRs in 30d

Description

**Describe the feature you'd like**
I'd like a subcommand for `cloudflared access` that prints the user's information as JSON, optionally pretty-printed. I want to use the output of this command for scripts to take action based on user identity.

**Describe alternatives you've considered**
The recommended way to get the user identity is to call `https://.cloudflareaccess.com/cdn-cgi/access/get-identity` [1], but this does not work when using `cloudflared access curl`. Enabling this functionality may also solve this issue.

```
alex@Alexs-MacBook-Pro> cloudflared access curl https://mycorp.cloudflareaccess.com/cdn-cgi/access/get-identity
failed to find Access application at https://mycorp.cloudflareaccess.com/cdn-cgi/access/get-identity
```

[0] https://developers.cloudflare.com/cloudflare-one/identity/authorization-cookie/application-token/#user-identity

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.