Skip to content

Conversation

@raethlo
Copy link
Contributor

@raethlo raethlo commented Oct 30, 2025

This PR adds docs for a new platfrom feature: Actor permissions.

Copy link
Contributor

@tobice tobice left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gave it a quick look; it still needs a bit of love. I'd even rethink the structure a bit ;D

- `["READ"]` — the Actor may read from the referenced resource(s).
- `["READ", "WRITE"]` — the Actor may read and write to the referenced resource(s).

Notes:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's mention that this will be communicated to the users via the form (the tooltip).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the copy that needs to be updated. Let's not forget about updating this screenshot as well.

@apify-service-account
Copy link

Preview for this PR was built for commit 5b8c483a and is ready at https://pr-2053.preview.docs.apify.com!

@raethlo raethlo marked this pull request as ready for review November 5, 2025 17:26
@raethlo raethlo requested review from tobice and removed request for fnesveda and janbuchar November 5, 2025 17:27
@apify-service-account
Copy link

Preview for this PR was built for commit f0e0ded7 and is ready at https://pr-2053.preview.docs.apify.com!

@raethlo raethlo requested a review from nmanerikar November 6, 2025 09:25
Copy link

@nmanerikar nmanerikar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few comments, suggestions and corrections.


![Actor permissions configuration in Actor settings](./images/actor_settings_permissions.webp)

### End-user experience

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a repetition of the "Impact of Permission Level" section below. Maybe just remove this and move the screenshot to that section?

Copy link
Contributor Author

@raethlo raethlo Nov 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

3a0c308 Decided to leave the end user experience section and move the implications section(+your suggestions) to the warning admonition.

}
```

Now when the platform runs your Actor, it’ll automatically add the user provided storage the Actor’s scope so that it can access it.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

...to the Actor's scope...


:::

**If the existing contents of the named storage is critical for your Actor to keep functioning for the existing users** (as in, you can’t afford removing the storage), reach out to us. We can discuss the available options.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the existing contents of the named storage are critical...

Also, is the emphasis necessary for such a long part of the sentence?

@apify-service-account
Copy link

Preview for this PR was built for commit 3a0c308d and is ready at https://pr-2053.preview.docs.apify.com!

@apify-service-account
Copy link

Preview for this PR was built for commit 8c021135 and is ready at https://pr-2053.preview.docs.apify.com!

@raethlo raethlo requested a review from nmanerikar November 6, 2025 12:51
@apify-service-account
Copy link

Preview for this PR was built for commit 8c021135 and is ready at https://pr-2053.preview.docs.apify.com!

@raethlo
Copy link
Contributor Author

raethlo commented Nov 6, 2025

🚧 Note: before this can go live we still need to update the screenshots.

@apify-service-account
Copy link

Preview for this PR was built for commit abbcddc3 and is ready at https://pr-2053.preview.docs.apify.com!

Copy link

@nmanerikar nmanerikar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the changes! I just have a couple more observations. Apart from those, this looks fine from my perspective.

Comment on lines 46 to 51
- How your Actor uses storages: if it only writes to default storages, no changes needed.
- Whether it calls other Actors: targets must also use limited permissions.
- Whether it accesses user-provided storages: declare `resourceType` and `resourcePermissions` in `input_schema.json`.
- Whether it uses named storages: rename/recreate and migrate data to retain access under limited permissions.
- Whether it needs to know if the user is paying: use `APIFY_USER_IS_PAYING` or the SDK.
- Whether it needs the user's proxy password: use `APIFY_PROXY_PASSWORD` or the SDK.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this list is necessary - it simply duplicates what you have stated below. Could remove it entirely, including the sentence before it "To assess what, if anything, needs to change in your Actor, review the following:"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair, I liked the idea of having a summary before the respective more detailed sections, but as the sections are not as detailed, I think we can drop it,

Comment on lines 61 to 73
:::warning

Actor permissions are a new feature. With the initial release, the distinction between full-permissions and limited-permissions Actors is primarily informational, but it will become increasingly significant over time.

Future changes may include:

- Stronger confirmations and/or warnings added when running full-permissions Actors
- Actors requiring full permissions may receive a lower [Actor Quality score](../../publishing/quality_score.mdx), which can reduce their ranking in the store.
- Some platform features and recommendations may prioritize limited-permissions Actors by default.

Whenever possible, design your Actors to use limited permissions and request only access they truly need.

:::

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking through the preview, this feels like quite a lot of content for a warning block. Maybe we could have just the first paragraph in the warning block, and the rest (Future changes may include...") as normal content.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should drop any mentions of future changes, they are not relevant to documentation. Documentation should focus only on now.

@apify-service-account
Copy link

Preview for this PR was built for commit 9bd30ca7 and is ready at https://pr-2053.preview.docs.apify.com!

Copy link
Contributor

@danpoletaev danpoletaev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good 👍
Left few suggestions, more like nits and optional stuff, that might improve readability.

Main concern is that currently permissions and migration_guide a bit mixed up, there're some section that might be more logical in migration_guide, but it is only my opinion, we can discuss it 🙃


See the full [input schema reference for details.](../actor_definition/input_schema/specification.md).

### Requesting full permissions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Title doesn't correspond to what we write in the paragraph. Who is requesting full permissions? Sounds confusing.

Maybe Keeping full permissions?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also not sure, maybe move to migrations?


Recommended minimum SDK versions:

- JavaScript SDK: [apify@3.4.4](https://github.com/apify/apify-sdk-js/releases/tag/apify%403.4.4)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(nit): why versions are inconsistent, let's just keep numbers ? 3.4.4 and 3.0.0

:::


### Accessing user provided storages
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(opt): This section feels strange for me. In the article we're talking about how Actor permissions work and than in this section we switch to just limited permissions, also we kind of repeat ourselves a bit, because there's a very similar information in the migration, maybe this section should be in migration?

But on the other hand this section would make sense for me, if we'll also speak about how it currently works for full permissions:

  • no need to pass resourcePermissions
  • some devs could avoid using inputs and just have it hardcoded in the code.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it, I've added a bit about full permissions here b6d6eb8


---

Use this guide to migrate existing Actors to use [limited permissions](index.md#how-actor-permissions-work). The general prerequisite is to update to the latest [Apify SDK](https://docs.apify.com/sdk).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(nit):

Suggested change
Use this guide to migrate existing Actors to use [limited permissions](index.md#how-actor-permissions-work). The general prerequisite is to update to the latest [Apify SDK](https://docs.apify.com/sdk).
This guide explains how to migrate your existing Actors to use [limited permissions](https://github.com/apify/apify-docs/pull/2053/index.md#how-actor-permissions-work). Before you start, make sure your Actor uses the latest [Apify SDK](https://docs.apify.com/sdk)
.


Actors sometimes use named storages for caching or persisting state across runs. With limited permissions, an Actor can create a named storage on its first run and will automatically retain access to it in all subsequent runs by the same user.

If your Actor previously relied on accessing a pre-existing named storage, you will need to rename it in your code. This will cause the Actor to recreate the storage under the new system on its next run.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(nit): oh, I am afraid that no one would do it, it seems complicated 😄
But I understand that there's not much we can do about it.

Maybe I would also add to this section something like avoid using hardcoded storages and just update the input, so user can provide it(and link to "The actor accesses storages provided by users" or to current "Accessing user provided storages")?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a pretty good idea how to migrate existing storages 👍🏻

@tobice tobice removed their request for review November 6, 2025 16:05
@tobice
Copy link
Contributor

tobice commented Nov 6, 2025

👋 With the detailed review from Dan and Nish, I don't think my voice is needed here... so Roman don't wait on an approval from me 😊

Co-authored-by: Daniil Poletaev <44584010+danpoletaev@users.noreply.github.com>
@apify-service-account
Copy link

Preview for this PR was built for commit 400fd21c and is ready at https://pr-2053.preview.docs.apify.com!

@apify-service-account
Copy link

Preview for this PR was built for commit 1f404844 and is ready at https://pr-2053.preview.docs.apify.com!

Copy link

@nmanerikar nmanerikar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couple of small nits

### Accessing user provided storages

Limited-permissions Actors can access storages that users explicitly provide via the Actor input. Use the input schema to add a storage picker and declare exactly which operations your Actor needs.
By default, limited-permissions Actors can't access users storages. However, they can access storages that users explicitly provide via the Actor input. To do so, use the input schema to add a storage picker and declare exactly which operations your Actor needs.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

either user storages or users' storages. For consistency with other places, user storages - I see this used below.

- Set `resourceType` to one of `dataset`, `keyValueStore`, or `requestQueue`.
- Specify `resourcePermissions` with the minimal required scope: `"READ"` or `"READ", "WRITE"`.

Actors running under full permissions are assumed to have full (i.e. read/write/manage) access to user storages, in that case the `resourcePermissions` field does not have to be set.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Actors running under full permissions are assumed to have full (i.e. read/write/manage) access to user storages, in that case the `resourcePermissions` field does not have to be set.
Actors running under full permissions are assumed to have full (i.e. read/write/manage) access to user storages. In that case the `resourcePermissions` field does not have to be set.

:::

### Declaring permissions
### Configuring Actor permissions level

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
### Configuring Actor permissions level
### Configuring Actor permission level

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants