Skip to content
This repository was archived by the owner on Sep 29, 2023. It is now read-only.

Commit 01c2fcd

Browse files
authored
Merge pull request #293 from appwrite/feat-remove-admin-mode
Remove admin mode
2 parents 2b05c55 + 130185b commit 01c2fcd

File tree

4 files changed

+15
-10
lines changed

4 files changed

+15
-10
lines changed

app/views/docs/admin.phtml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
1-
<p>The Appwrite API has two different modes it can use, the first mode is the client mode, which is the <b>default</b> mode, and the second one is the <b>admin</b> or server mode.</p>
1+
<p>You can use Appwrite to build both client and server integrations. Client integrations are for frontend and mobile applications, which use Appwrite's Client APIs and <a href="/docs/sdks#client">Client SDKs</a>. Server integrations, including the Appwrite CLI, are for backend and CLI applications which use Appwrite's Server APIs and <a href="/docs/sdks#server">Server SDKs.</a></p>
22

3-
<p>When using Appwrite from the client-side, you should go with the normal default mode. This mode allows every user of your project to access only resources they have been granted access to. When running in admin mode, you remove Appwrite default access restriction and ultimately allow access to any of the resources available on your Appwrite project (files, documents, or collections).</p>
3+
<p>When building client integrations with the Client SDKs, you authenticate with an account and operate in the scope of the account. This means Client SDKs can only access resources that your account has been granted permission to access.</p>
44

5-
<p>For security reasons, the admin mode only works in combination with an API key. You can create an API key from the Appwrite console, and you can choose what scopes of access you are willing to grant your SDK.</p>
5+
<ul>
6+
<li class="margin-bottom"><a href="/docs/permissions" rel="noopener"><i class="icon-angle-circled-right margin-start-negative-tiny margin-end-tiny"></i> Learn more about permissions</a></li>
7+
</ul>
68

7-
<p>Please note: passing an API key from a client SDK is a <strong>major</strong> security issue. Use your API key only from a server-side integration and make sure you store them securely and privately. There are many sources online that advise what the best practices regarding the storing of secrets and API keys on your server are.</p>
9+
<p>When building server integrations with the Server SDKs, you operate in the scope of an API key instead of an account. API keys are created with scopes that specify the type of resources they can access and the type of operations they can perform on those resources. API keys bypass permissions and can access all resources belonging to any account.</p>
10+
11+
<ul>
12+
<li class="margin-bottom"><a href="/docs/keys" rel="noopener"><i class="icon-angle-circled-right margin-start-negative-tiny margin-end-tiny"></i> Learn more about API keys</a></li>
13+
</ul>

app/views/docs/authentication.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<h2><a href="/docs/authentication#account-vs-user-api" id="account-vs-user-api">Account vs Users API</a></h2>
88

99
<p>
10-
The Account API operates in the scope of the currently logged-in account and is usually used in a frontend or mobile app. The Users API is used in backend integrations and operates in an admin scope using an API key with access to all your project users.
10+
The Account API operates in the scope of the currently logged-in account and is usually used in a frontend or mobile app. The Users API is used in backend integrations and uses an API key with access to all your project users.
1111
</p>
1212

1313
<p>

app/views/docs/getting-started-for-server.phtml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -216,11 +216,10 @@ let client = Client()
216216
</ul>
217217

218218
<div class="notice">
219-
<h3>A Note About API Keys & Admin Mode</h3>
219+
<h3>API Key Authentication</h3>
220+
<p>When using Server SDKs, you authenticate with API keys. API keys are not restricted by account-based permissions but have restrictions on the types of resources that can be accessed. This means API keys can access all resources of specified types, regardless of which account can access them.</p>
220221

221-
<p>When using Appwrite API from your server-side with an API Key, you automatically run in <b>admin mode</b>. Admin mode disables the default user <a href="/docs/permissions">permission access control</a> restrictions and allows you to access all the resources available on your project. This is very useful when you want to manipulate your users' data like files and documents or even if you want to get a list of your users.</p>
222-
223-
<p>Please note it is <b>highly</b> not recommended to run the admin mode from your client-side as it may lead to huge privacy and security issues. Check the <a href="/docs/admin">Admin Mode</a> documentation to learn more</p>
222+
<p><a href="/docs/keys">Learn more about API keys</a></p>
224223
</div>
225224

226225
<h3><a href="/docs/getting-started-for-server#jwt" id="jwt">JSON Web Token (JWT) &nbsp;<span class="text-size-small text-fade">version >= 0.8</span></a></h3>

app/views/docs/permissions.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
<h2 id="server-integration"><a href="/docs/permissions#server-integration">Server Integration</a></h2>
2424

25-
<p>A server or <a href="/docs/admin">admin integration</a> can be used for increased flexibility. When using a Server SDK in combination with the proper <a href="/docs/keys#scopes">API key scopes</a>, you can have any type of access to any of your project resources regardless of their permissions.</p>
25+
<p>Server integrations can be used for increased flexibility. When using a Server SDK in combination with the proper <a href="/docs/keys#scopes">API key scopes</a>, you can have any type of access to any of your project resources regardless of their permissions.</p>
2626

2727
<p>Using the server integration flexibility, you can change resource permissions, share resources between different users and teams, or edit and delete them without any limitations.</p>
2828

0 commit comments

Comments
 (0)