Skip to content

Commit 0d77b21

Browse files
committed
doc: rename policy references
1 parent 311a003 commit 0d77b21

File tree

4 files changed

+453
-20
lines changed

4 files changed

+453
-20
lines changed

doc/api/errors.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3577,7 +3577,7 @@ The native call from `process.cpuUsage` could not be processed.
35773577
[domains]: domain.md
35783578
[event emitter-based]: events.md#class-eventemitter
35793579
[file descriptors]: https://en.wikipedia.org/wiki/File_descriptor
3580-
[policy]: policy.md
3580+
[policy]: permissions.md#policies
35813581
[self-reference a package using its name]: packages.md#self-referencing-a-package-using-its-name
35823582
[stream-based]: stream.md
35833583
[syscall]: https://man7.org/linux/man-pages/man2/syscalls.2.html

doc/api/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
* [OS](os.md)
4646
* [Path](path.md)
4747
* [Performance hooks](perf_hooks.md)
48-
* [Policies](policy.md)
48+
* [Permissions](permissions.md)
4949
* [Process](process.md)
5050
* [Punycode](punycode.md)
5151
* [Query strings](querystring.md)

doc/api/permissions.md

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,29 @@
11
# Permissions
22

3-
This section exposes security features available to be adopted in a
4-
Node.js application. The available scopes are:
3+
Permissions can be used to control what system resources the
4+
Node.js process has access to or what actions the process can take
5+
with those resources. Permissions can also control what modules can
6+
be accessed by other modules.
57

6-
* [Resource-based permissions](#resource-based-permissions)
7-
* [Process-based permissions](#process-based-permissions)
8+
* [Process-based permissions](#process-based-permissions) control the Node.js process's access to
9+
resources such as the file system or the network. The resource can be
10+
entirely allowed or denied, or actions related to it can be controlled;
11+
for example, you can allow file system reads while denying writes.
812

9-
Resource-based permissions stands for the managment of modules using
10-
policies. A policy can guarantee which module/resource is available
11-
during the application execution.
13+
* [Module-based permissions](#module-based-permissions) control which files or URLs are available
14+
to other modules during application execution. This can be used to
15+
control what modules can be accessed by third-party dependencies,
16+
for example.
1217

13-
Process-based permissions stands for the management of resources such
14-
as _File System_ or _Network_. A permission can be configured to restrict
15-
access to specific resources, for instance, one can restrict access to
16-
all the _File System_ write.
18+
Both types of permissions can be used together to provide a
19+
safer environment. If you find a potential security vulnerability,
20+
please refer to our [Security Policy][].
1721

18-
Both permissions can be used together to provide a safer environment.
22+
## Process-based permissions
1923

20-
**Note**: if you find a potential security vulnerability on Node.js,
21-
refer to our [Security Policy][].
24+
// STUB
2225

23-
## Resource-based permissions
26+
## Module-based permissions
2427

2528
## Policies
2629

@@ -447,9 +450,7 @@ not adopt the origin of the `blob:` URL.
447450
Additionally, import maps only work on `import` so it may be desirable to add a
448451
`"import"` condition to all dependency mappings.
449452

450-
## Process-based permissions
451-
453+
[Security Policy]: https://github.com/nodejs/node/blob/main/SECURITY.md
452454
[import maps]: https://url.spec.whatwg.org/#relative-url-with-fragment-string
453455
[relative-url string]: https://url.spec.whatwg.org/#relative-url-with-fragment-string
454456
[special schemes]: https://url.spec.whatwg.org/#special-scheme
455-
[Security Policy]: https://github.com/nodejs/node/blob/main/SECURITY.md

0 commit comments

Comments
 (0)