Skip to content
Leaked secrets Write-up Beginner

Finding hidden gems vol. 1: forging OAuth tokens using discovered client id and client secret

A publicly accessible package.json file referenced a Node.js source file that contained hardcoded OAuth client IDs and secrets. Using the production credentials, the hunter obtained an access token and read user data from Microsoft Graph.

Mateusz Olejarka Follow

Published on medium.com

Bounty$3,134 View original

I love sensitive information exposure bugs. They are getting more attention at last.

Mateusz Olejarka, on medium.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 6 min read.

Context

This is a story about sensitive information exposure: a leaked Node.js source file that contained OAuth client credentials, and what those credentials could be used for. The target was a company whose application runs on Microsoft Azure, discovered through a public bug bounty program on Bugcrowd. The report does not name the company or the application.

The feature at the centre of it is the OAuth 2.0 client credentials grant. As the report quotes from RFC 6749:

Client credentials are used as an authorization grant typically when the client is acting on its own behalf (the client is also the resource owner) or is requesting access to protected resources based on an authorization previously arranged with the authorization server.

In practice, a confidential client holds a client id and a client secret, exchanges them at the authorisation server's token endpoint, and receives an access token it can use against an API without any user being involved. If those two values leak, whoever finds them can act as that client.

Setup

There were no accounts, roles or special tooling to set up. The starting point was one of the researcher's bug bounty recon tools, which surfaced a publicly reachable package.json file. From other recon results the researcher already knew the company was built on top of Microsoft Azure, which pointed to the Azure AD OAuth documentation for the client credentials flow. The only thing needed to test the finding was the ability to send HTTP requests to Microsoft's login and Graph endpoints.

Finding it

A recon tool reported a package.json file that looked interesting. A package.json is the description of a Node.js module, and this one looked like this:

JSON
{ "name": "[…redacted…]", "description": "[…redacted…]", "version": "[…redacted…]", "private": true, […redacted…] "engines": { "node": ">=6.9.1" }, "scripts": { "start": "node server/[…redacted…].js" }}

The scripts section contained a path to a Node.js file to execute. Curious about its contents, the researcher downloaded it. It was a huge file containing Node.js code, and inside it were four variables that looked very promising:

JavaScript
const devClientId = '11e7f9d3–9bbf-4a01-a23e-c9c58e3acb1d';const prodClientId = 'a2ae2727-aa6a-4197–823e-40e6d4e503a7';const devClientSecret = 'd[…redacted…]=';const prodClientSecret = 'b[…redacted…]=';

The values in the report were replaced or redacted, as the author states in a disclaimer. The names alone, devClientId, prodClientId, devClientSecret and prodClientSecret, made the intent clear: two environments, each with an OAuth client id and secret sitting in source code that was reachable from the internet.

The pair of values rang a bell about the client credentials grant type. The researcher wanted to check whether the production pair was still valid.

Exploitation

Step 1: request a token with the client credentials grant

The token endpoint for the tenant follows the Azure AD v2.0 pattern, with the tenant name in the path:

HTTP
POST /[redacted].onmicrosoft.com/oauth2/v2.0/token HTTP/1.1Host: login.microsoftonline.comContent-Type: application/x-www-form-urlencodedContent-Length: 190client_id=a2ae2727-aa6a-4197–823e-40e6d4e503a7&scope=https%3A%2F%2Fgraph.microsoft.com%2F.default&client_secret=b[…redacted…]%3d&grant_type=client_credentials

The body carries the four parameters the grant requires: client_id (the production id from the leaked file), scope set to https://graph.microsoft.com/.default, the client_secret (URL-encoded, note the trailing %3d for the = at the end of the secret), and grant_type=client_credentials. The response was a success:

HTTP
HTTP/1.1 200 OK[…]{ “token_type”:”Bearer”, “expires_in”:3600, “ext_expires_in”:0, “access_token”:”eyJ[…redacted…]”}

The server returned a JWT access token, valid for 3600 seconds. The production credentials were still valid.

Step 2: use the token against Microsoft Graph

One thing was left: actually use the token and try to get some data. The researcher picked an API call that returns users:

HTTP
GET /v1.0/users HTTP/1.0Host: graph.microsoft.comAuthorization: Bearer eyJ[…redacted…]

The response was another success:

The token was accepted and the directory listing came back: user ids, display names, given names, surnames, mail addresses, user principal names and office locations. The researcher's conclusion was short: it worked.

The finding was made in a public program on Bugcrowd, and the reward was 3133.7$.

Root cause

The mistake was that OAuth client credentials, both development and production, were hard-coded in a Node.js source file, and that file was reachable from the internet alongside the package.json that pointed to it. The package.json itself was the signpost: its scripts.start entry named the server file, and downloading that file gave up the secrets.

Nothing in the flow stopped the credentials from being used. The client credentials grant is designed for exactly this: a client presenting its id and secret and receiving a token with no user interaction. The production secret was still valid at the time of testing, and the client had been granted access to Microsoft Graph.

Impact

With a valid production client id and secret, an attacker can obtain access tokens for the client's identity for as long as the secret remains valid, and use them against whatever the client is authorised to reach. In this case that included Microsoft Graph, and the /v1.0/users call returned directory data: names, mail addresses, user principal names and office locations of employees. The report shows only that one API call; what else the client was permitted to do is not stated.

The exposure depends on the leaked file staying reachable and the secret not being rotated.

Fix

The company removed the credentials from the code. They are now read at runtime from Consul:

The Consul class takes the Consul host in its constructor, fetches the CLIENT_ID and APP_KEY keys from it, and base64-decodes the returned value. The host itself comes from an environment variable:

JavaScript
const consulHost = process.env.CONSUL

So the secrets are now fetched from Consul through configuration. The report does not say whether the leaked production secret was rotated, which is the other half of a complete fix.

Lessons learned

The researcher's own takeaways:

  • For myself: don't give up; take a break, return to the problem the next day and solve it easily.
  • Bug hunters: definitely check for package.json files.
  • Developers: check what is in your package.json and make sure you don't leak anything interesting.

Variants to test

  1. Hunt for package.json on other targets. A positive result is a file whose scripts section names a server entry point; fetch that file next and look for credentials, connection strings or API keys.
  2. Follow the entry point. When scripts.start points at a file, request it directly. A positive result is source code returned as text rather than a 404 or an error page.
  3. Grep leaked source for OAuth pairs. Look for names like clientId, clientSecret, appKey, and for dev/prod prefixes. A positive result is a pair of values that look like a GUID and a long random string.
  4. Test the production pair against the token endpoint. Send a client credentials request with grant_type=client_credentials and the API's default scope. A positive result is a 200 with token_type and access_token in the body.
  5. Use the token on a read-only endpoint. A positive result is a 200 with real data, which confirms the client's permissions rather than just its existence.
  6. Check whether secrets were rotated after disclosure. Repeating the token request later tells you whether the fix was code-only or included rotation.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 16 min read.

What happened, in plain words

A company had a publicly reachable file that described one of its programs. That file pointed to another file, which contained the program's actual code. Inside that code were four values: development and production client ids and secrets that the company's software uses to talk to Microsoft's cloud services. Anyone who found those two values could ask Microsoft for an access pass, and Microsoft would hand one over. With that pass, the researcher could read the company's list of employees from Microsoft's directory service. The company paid a reward of 3133.7$ and changed its code so the secrets were no longer stored in the file.

This kind of bug is called sensitive information exposure: private data (passwords, keys, personal details) ends up somewhere the public can reach it. The researcher who found it was Mateusz Olejarka (@molejarka), and the finding was made in a public bug bounty program on Bugcrowd. A bug bounty program is a scheme where a company invites outside people to look for security problems in its systems and pays them for valid findings. The report does not name the company or the application.

The feature at the centre of it: OAuth client credentials

Before the story makes sense, you need to know what OAuth is. Imagine a hotel. You do not give every guest a master key; instead the front desk checks who you are and issues a key card that opens only certain doors, only for a while. OAuth works the same way for software: instead of handing out real passwords, a service issues a temporary access token (the key card) that another program can use to call an API.

An API (Application Programming Interface) is a way for one program to ask another program for data or actions, usually over the internet. When your weather app shows tomorrow's forecast, it is calling a weather API. When a company's internal tool lists its employees, it may be calling Microsoft's API.

The specific OAuth feature here is the client credentials grant. Normally a token is issued after a person logs in. In this grant there is no person: one program (the client) proves its identity directly to the authorisation server using two values, a client id (like a username) and a client secret (like a password). If both are correct, the server returns an access token. The report quotes the official specification, RFC 6749:

Client credentials are used as an authorization grant typically when the client is acting on its own behalf (the client is also the resource owner) or is requesting access to protected resources based on an authorization previously arranged with the authorization server.

In plain words: this grant exists for programs that act on their own behalf, with no human in the loop. That is exactly why a leaked client id and secret are dangerous. Whoever holds them can pretend to be that program and receive tokens, without needing anyone's password or login.

Setup

There was nothing to install and no account to create. The starting point was one of the researcher's recon tools. Recon (short for reconnaissance) means the information-gathering phase: looking at what a company exposes publicly, such as files, subdomains and error pages, before trying anything intrusive. A recon tool automates that looking.

From earlier recon results the researcher already knew the company was built on top of Microsoft Azure, Microsoft's cloud platform. Azure includes Azure AD (Azure Active Directory), Microsoft's identity service, which issues OAuth tokens, and Microsoft Graph, an API that exposes Microsoft 365 data such as users, mail and files. Knowing the platform told the researcher which documentation to read: the Azure AD guide to the client credentials flow. The only capability needed to test the finding was the ability to send HTTP requests to Microsoft's login and Graph servers. An HTTP request is the message a browser or tool sends to a web server to ask for something; a response is the server's reply, carrying a status code such as 200 (success) or 404 (not found).

Finding it

The signpost: package.json

A recon tool reported a package.json file that looked interesting. A package.json is the description file of a Node.js module. Node.js is a runtime that lets programmers write server-side software in JavaScript, and every Node.js project has a package.json that records its name, version, dependencies and the commands used to start it. This one looked like this:

JSON
{ "name": "[…redacted…]", "description": "[…redacted…]", "version": "[…redacted…]", "private": true, […redacted…] "engines": { "node": ">=6.9.1" }, "scripts": { "start": "node server/[…redacted…].js" }}

Line by line:

  • "name", "description", "version": the project's name, a short description and its version number. All three were redacted in the report.
  • "private": true: a flag saying the package is not meant to be published to the public npm registry.
  • "engines": { "node": ">=6.9.1" }: the minimum Node.js version the project needs.
  • "scripts": { "start": "node server/[…redacted…].js" }: the command that starts the application. It runs Node.js on a file inside a server folder. The file name is redacted, but the path is the important part: it tells you exactly which source file the application runs.

The scripts section therefore contained a path to a Node.js file to execute. Curious about its contents, the researcher downloaded it. It was a huge file containing Node.js code. This is the key move of the whole story: the package.json was a signpost, and following the signpost led to the source code.

The secrets inside the source

Inside that file were four variables that looked very promising:

JavaScript
const devClientId = '11e7f9d3–9bbf-4a01-a23e-c9c58e3acb1d';const prodClientId = 'a2ae2727-aa6a-4197–823e-40e6d4e503a7';const devClientSecret = 'd[…redacted…]=';const prodClientSecret = 'b[…redacted…]=';

Line by line:

  • const devClientId = '11e7f9d3–9bbf-4a01-a23e-c9c58e3acb1d';: a constant (a value that does not change while the program runs) holding the client id used in the development environment. A development environment is the copy of the software used while building and testing it.
  • const prodClientId = 'a2ae2727-aa6a-4197–823e-40e6d4e503a7';: the client id used in production, the live copy that real users and real data touch.
  • const devClientSecret = 'd[…redacted…]=';: the matching secret for development. The value is redacted in the report.
  • const prodClientSecret = 'b[…redacted…]=';: the matching secret for production, also redacted.

The values in the report were replaced or redacted, as the author states in a disclaimer. The names alone made the intent clear: two environments, each with an OAuth client id and secret sitting in source code that was reachable from the internet. A secret in this context is a password-like string that proves a program's identity; it must never be visible to outsiders.

The pair of values rang a bell about the client credentials grant type. The researcher wanted to check whether the production pair was still valid. That is the natural next question: a secret found in a file might be old, already replaced, or for a test system. The only way to know is to try it.

Exploitation

Step 1: request a token with the client credentials grant

The token endpoint for the tenant follows the Azure AD v2.0 pattern, with the tenant name in the path. A tenant is the isolated directory that belongs to one organisation inside Azure AD. A token endpoint is the specific URL where tokens are issued.

HTTP
POST /[redacted].onmicrosoft.com/oauth2/v2.0/token HTTP/1.1Host: login.microsoftonline.comContent-Type: application/x-www-form-urlencodedContent-Length: 190client_id=a2ae2727-aa6a-4197–823e-40e6d4e503a7&scope=https%3A%2F%2Fgraph.microsoft.com%2F.default&client_secret=b[…redacted…]%3d&grant_type=client_credentials

Line by line:

  • POST /[redacted].onmicrosoft.com/oauth2/v2.0/token HTTP/1.1: the request method is POST, which sends data to the server (as opposed to GET, which asks for data). The path is the token endpoint of the company's tenant; the tenant name is redacted. HTTP/1.1 is the version of the protocol being spoken.
  • Host: login.microsoftonline.com: the server being contacted, Microsoft's login service.
  • Content-Type: application/x-www-form-urlencoded: tells the server the body is formatted as key=value pairs joined by &, the same format a web form uses.
  • Content-Length: 190: the size of the body in bytes.
  • client_id=a2ae2727-aa6a-4197–823e-40e6d4e503a7: the production client id copied from the leaked file.
  • scope=https%3A%2F%2Fgraph.microsoft.com%2F.default: the scope says what the token should be allowed to do. Here it asks for Microsoft Graph. The value is URL-encoded: %3A is a colon and %2F is a slash, so the decoded value is https://graph.microsoft.com/.default. URL encoding is how special characters are carried safely inside a URL or form body.
  • client_secret=b[…redacted…]%3d: the production secret, also URL-encoded. The trailing %3d is an encoded =, the character at the end of the secret.
  • grant_type=client_credentials: tells the server which OAuth flow is being used, the client credentials grant described above.

The response was a success:

HTTP
HTTP/1.1 200 OK[…]{ “token_type”:”Bearer”, “expires_in”:3600, “ext_expires_in”:0, “access_token”:”eyJ[…redacted…]”}

Line by line:

  • HTTP/1.1 200 OK: status 200 means the request succeeded.
  • "token_type":"Bearer": the token is a bearer token. That means whoever holds it ("bears" it) can use it; no further proof of identity is asked for. This is why tokens must be kept secret, just like passwords.
  • "expires_in":3600: the token is valid for 3600 seconds, one hour.
  • "ext_expires_in":0: an additional expiry field returned by Microsoft's service.
  • "access_token":"eyJ[…redacted…]": the token itself, redacted in the report. The eyJ at the start is characteristic of a JWT (JSON Web Token), a token format that packs information into a signed, encoded string.

The server returned a JWT access token, valid for 3600 seconds. The production credentials were still valid. Rotating a secret means replacing it with a new one and invalidating the old, which is what a company should do as soon as a secret may have leaked.

Step 2: use the token against Microsoft Graph

One thing was left: actually use the token and try to get some data. Getting a token only proves the credentials work; using it proves what the client is allowed to reach. The researcher picked an API call that returns users:

HTTP
GET /v1.0/users HTTP/1.0Host: graph.microsoft.comAuthorization: Bearer eyJ[…redacted…]

Line by line:

  • GET /v1.0/users HTTP/1.0: GET asks the server for data. The path /v1.0/users is the Microsoft Graph endpoint that lists users in the directory.
  • Host: graph.microsoft.com: the Microsoft Graph server.
  • Authorization: Bearer eyJ[…redacted…]: the Authorization header carries the token. The word Bearer declares the token type, and the token follows. A header is a labelled line of extra information attached to an HTTP request or response.

The response was another success:

Line by line:

  • HTTP/1.1 200 OK: the request succeeded.
  • The body is a list of user records. Each record has an id (a unique identifier for the account), businessPhones, displayName (the name shown in the directory), givenName (first name), jobTitle, mail (email address), mobilePhone, officeLocation, preferredLanguage, surname (last name) and userPrincipalName (the login name in the directory).
  • Many fields are null, meaning empty or not set. The […] at the end shows the list continues beyond what is printed.

The token was accepted and the directory listing came back: user ids, display names, given names, surnames, mail addresses, user principal names and office locations. The researcher's conclusion was short: it worked.

The finding was made in a public program on Bugcrowd, and the reward was 3133.7$.

Root cause

The mistake was that OAuth client credentials, both development and production, were hard-coded in a Node.js source file, and that file was reachable from the internet alongside the package.json that pointed to it. Hard-coded means written directly into the source code as fixed text, rather than loaded from a safe store at runtime. The package.json itself was the signpost: its scripts.start entry named the server file, and downloading that file gave up the secrets.

Nothing in the flow stopped the credentials from being used. The client credentials grant is designed for exactly this: a client presenting its id and secret and receiving a token with no user interaction. The production secret was still valid at the time of testing, and the client had been granted access to Microsoft Graph.

Impact

Impact means what an attacker could actually do with the bug. With a valid production client id and secret, an attacker can obtain access tokens for the client's identity for as long as the secret remains valid, and use them against whatever the client is authorised to reach. In this case that included Microsoft Graph, and the /v1.0/users call returned directory data: names, mail addresses, user principal names and office locations of employees. The report shows only that one API call; what else the client was permitted to do is not stated.

The exposure depends on the leaked file staying reachable and the secret not being rotated.

Fix

The company removed the credentials from the code. They are now read at runtime from Consul. Consul is a service that stores configuration and secrets centrally, so programs can fetch them when they start instead of carrying them in their source files.

Line by line:

  • class Consul {: defines a class, a reusable blueprint for an object in JavaScript. This one represents the connection to Consul.
  • constructor(url) { this.consulHost = url; }: the constructor runs when a new Consul object is created. It stores the Consul server's address in this.consulHost.
  • getClientId() { return this.getConsulValue(‘v1/[redacted]/CLIENT_ID’); }: a method (a function belonging to the class) that fetches the key named CLIENT_ID from Consul.
  • getClientSecret() { return this.getConsulValue(‘v1/[redacted]/APP_KEY’); }: the same for the key named APP_KEY, which holds the secret.
  • getConsulValue(consulKey) {: the shared helper that does the actual fetching for a given key.
  • return request({ url: ${this.consulHost}/${consulKey}, json: true }): sends an HTTP request to the Consul server at the stored host plus the key path, asking for JSON back. The backticks build the URL from the two pieces.
  • .promise(): turns the request into a promise, an object representing a result that will arrive later, so the code can chain steps without blocking.
  • .then((res) => res[0].Value): when the response arrives, take the Value field of the first entry.
  • .then((val) => (new global.Buffer(val, ‘base64’)).toString(‘utf8’)): decode that value from base64 (a way of writing binary data as plain text) into a normal UTF-8 string, which is the actual secret.
  • }}: closes the method and the class.
  • exports.Consul = Consul;: makes the class available to other files that import it.

The Consul class takes the Consul host in its constructor, fetches the CLIENT_ID and APP_KEY keys from it, and base64-decodes the returned value. The host itself comes from an environment variable, a named value set outside the code by whoever runs the program:

JavaScript
const consulHost = process.env.CONSUL

Line by line: process.env is Node.js's way of reading environment variables, and CONSUL is the name of the one holding the Consul address. So the secrets are now fetched from Consul through configuration. The report does not say whether the leaked production secret was rotated, which is the other half of a complete fix.

Lessons learned

The researcher's own takeaways:

  • For myself: don't give up; take a break, return to the problem the next day and solve it easily.
  • Bug hunters: definitely check for package.json files.
  • Developers: check what is in your package.json and make sure you don't leak anything interesting.

Variants to test

If you want to look for the same kind of bug yourself, these are the steps in order. Each one says what a positive result looks like, so you know when to continue and when to stop.

  1. Hunt for package.json on other targets. A positive result is a file whose scripts section names a server entry point; fetch that file next and look for credentials, connection strings or API keys.
  2. Follow the entry point. When scripts.start points at a file, request it directly. A positive result is source code returned as text rather than a 404 or an error page.
  3. Grep leaked source for OAuth pairs. Look for names like clientId, clientSecret, appKey, and for dev/prod prefixes. A positive result is a pair of values that look like a GUID and a long random string. A GUID is a long identifier in a fixed pattern of letters, digits and hyphens, like the client ids above.
  4. Test the production pair against the token endpoint. Send a client credentials request with grant_type=client_credentials and the API's default scope. A positive result is a 200 with token_type and access_token in the body.
  5. Use the token on a read-only endpoint. A positive result is a 200 with real data, which confirms the client's permissions rather than just its existence. Read-only means the call only retrieves data and changes nothing, which keeps the test safe.
  6. Check whether secrets were rotated after disclosure. Repeating the token request later tells you whether the fix was code-only or included rotation.

Glossary

  • Access token: a temporary key issued by an identity service that lets a program call an API, usually for a limited time.
  • API: a defined way for one program to ask another for data or actions over the internet.
  • Authorization header: a labelled line in an HTTP request that carries proof of identity, such as a bearer token.
  • Azure: Microsoft's cloud platform.
  • Azure AD: Microsoft's identity service, which issues OAuth tokens.
  • Base64: a way of writing binary data as plain text characters.
  • Bearer token: a token that anyone holding it can use, with no further proof of identity.
  • Bug bounty program: a scheme where a company pays outside researchers for valid security findings.
  • Bugcrowd: the platform on which this finding was reported.
  • Class: in JavaScript, a reusable blueprint for creating objects.
  • Client: in OAuth, the program that requests a token.
  • Client credentials grant: an OAuth flow where a program proves its identity with a client id and secret, with no user involved.
  • Client id: the public identifier a program uses to identify itself to an OAuth server, like a username.
  • Client secret: the private password-like value a program uses together with its client id.
  • Consul: a service that stores configuration and secrets centrally so programs can fetch them at runtime.
  • Constructor: the part of a class that runs when a new object is created.
  • Content-Type: an HTTP header saying how the body of a request is formatted.
  • Development environment: the copy of software used while building and testing it.
  • Endpoint: a specific URL where an API offers a particular operation.
  • Environment variable: a named value set outside the code by whoever runs the program.
  • GET: an HTTP method that asks a server for data.
  • GUID: a long identifier in a fixed pattern of letters, digits and hyphens.
  • Hard-coded: written directly into source code as fixed text instead of being loaded from a safe store.
  • Header: a labelled line of extra information attached to an HTTP request or response.
  • HTTP: the protocol browsers and programs use to exchange requests and responses with web servers.
  • Impact: what an attacker could actually do with a bug.
  • JWT (JSON Web Token): a token format that packs information into a signed, encoded string.
  • Method: the part of an HTTP request (such as GET or POST) that says what kind of action is wanted.
  • Microsoft Graph: Microsoft's API for data such as users, mail and files in Microsoft 365.
  • Node.js: a runtime that lets programmers write server-side software in JavaScript.
  • OAuth: a standard that lets programs obtain limited access tokens instead of sharing passwords.
  • package.json: the description file of a Node.js project, listing its name, version, dependencies and start commands.
  • POST: an HTTP method that sends data to a server.
  • Production environment: the live copy of software that real users and real data touch.
  • Promise: an object representing a result that will arrive later, allowing steps to be chained.
  • Recon: the information-gathering phase of security testing, looking at what a company exposes publicly.
  • Response: the server's reply to an HTTP request, carrying a status code and usually a body.
  • Rotating a secret: replacing a secret with a new one and invalidating the old.
  • Scope: the part of a token request that says what the token should be allowed to do.
  • Secret: a password-like string that proves a program's identity and must never be public.
  • Sensitive information exposure: a bug class where private data ends up somewhere the public can reach it.
  • Status code: the number in an HTTP response saying whether the request succeeded, such as 200 or 404.
  • Tenant: the isolated directory belonging to one organisation inside Azure AD.
  • Token endpoint: the URL where an OAuth server issues tokens.
  • URL encoding: a way of writing special characters safely inside a URL or form body, such as %3A for a colon.
  • Variable: a named container in a program that holds a value.
  • Read-only: a call that only retrieves data and changes nothing.

More by Mateusz Olejarka

View all

4 more disclosed reports, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Leaked secrets and credentials

The lesson behind this report.

Keys, tokens or passwords left in public code, apps, logs or responses, that grant real access.