Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Update token docs #4526

Merged
merged 1 commit into from Feb 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Binary file not shown.
30 changes: 15 additions & 15 deletions docs/source/bentocloud/how-tos/manage-access-token.rst
Expand Up @@ -2,11 +2,11 @@
Manage access tokens
====================

In BentoCloud, API tokens serve as a key method of authorization for two distinct scopes - BentoCloud access and Bento Deployments.
They correspond to two different types of tokens - **Developer tokens** and **User tokens**.
In BentoCloud, API tokens serve as a key method of authorization. You may use tokens to:

- Developer tokens are granted permissions to log in to BentoCloud and manage resources.
- User tokens are granted permissions to access protected Deployments, which have :ref:`bentocloud/how-tos/create-deployments:authorization` enabled.
- Log in to BentoCloud
- Manage BentoCloud resources
- Access protected Deployments, which have :ref:`bentocloud/how-tos/configure-deployments:Authorization` enabled

This tutorial explains how to create and use API tokens in BentoCloud.

Expand All @@ -17,26 +17,26 @@ Create an API token

To create an API token, perform the following steps:

1. Navigate to the `API Tokens <http://cloud.bentoml.com/api_tokens>`_ page in the BentoCloud Console.
1. Navigate to the `API Tokens <http://cloud.bentoml.com/api_tokens>`_ page on the BentoCloud console.
2. Click **Create**.
3. In the dialog that appears, specify the following fields. Note that you must select at least one of the token types.

.. image:: ../../_static/img/bentocloud/how-to/manage-access-tokens/token-creation-dialog.png

- **Name**: The name of the API token.
- **Description**: A description of the token, detailing its usage.
- **Developer Operations Access (Developer token)**: Grant permissions to access BentoCloud and manage resources on it.
- **Protected Endpoint Access (User token)**: Grant permissions to access Bento Deployments with Protected endpoints. If you select this token type, you need to choose the Deployment that you want the token to access. If you want to use the token to access all the Protected Deployments, select **All Deployments**.
- **Developer Operations Access**: Grant permissions to access BentoCloud and manage resources on it.
- **Protected Endpoint Access**: Grant permissions to access Bento Deployments with Protected endpoints. If you select this token type, you need to choose the Deployment that you want the token to access. If you want to use the token to access all the Protected Deployments, select **All Deployments**.
- **Expired At**: Set an expiration date for the token. You won't be able to use the token after it expires.

4. Click **Submit**.
5. Record the token. This is the only opportunity to record it.
6. All available tokens appear on the **API Tokens** page. Click **Delete** if you no longer needs a token.

Use the Developer token
=======================
Log in to BentoCloud using the BentoML CLI
==========================================

Interact with BentoCloud programmatically via the BentoML Command Line
After you create an token with Developer Operations Access, you can interact with BentoCloud programmatically via the BentoML Command Line
Interface (CLI). Log in using the following command.

.. code-block:: bash
Expand All @@ -45,7 +45,7 @@ Interface (CLI). Log in using the following command.

.. note::

You should see the above command after you create a token.
The above command is displayed automatically after you create a token.

Expected output:

Expand All @@ -61,10 +61,10 @@ To retrieve the current endpoint and API token locally, make sure you have insta

After you log in, you should be able to manage BentoCloud resources. For more information on the CLI, see :doc:`Reference - CLI </reference/cli>`.

Use the User token
==================
Access protected Deployments
============================

You can use User tokens to access Protected Bento Deployments. The following example provides different ways to interact with the :doc:`/get-started/quickstart` Summarization Service deployed with authorization enabled.
You can use a token with **Protected Endpoint Access** to access a protected Bento Deployment. The following example provides different ways to interact with the :doc:`/get-started/quickstart` Summarization Service deployed with authorization enabled.

.. tab-set::

Expand All @@ -82,7 +82,7 @@ You can use User tokens to access Protected Bento Deployments. The following exa
"text": "Your long text to summarize"
}'

.. tab-item:: BentoML client
.. tab-item:: Python client

Set the ``token`` parameter in your :doc:`client </guides/clients>`.

Expand Down
4 changes: 1 addition & 3 deletions docs/source/get-started/introduction.rst
Expand Up @@ -49,9 +49,7 @@ BentoML standardizes the saved model format, Service API definition and the Bent
How does BentoML work?
----------------------

In a typical ML workflow, you may need to prepare the data for your model, train and evaluate the model, serve the model in production, monitor its performance, and retrain the model for better inferences and predictions. BentoML features a streamlined path for transforming an ML model into a production-ready model serving endpoint. See the following diagram to understand the role of BentoML in the ML workflow:

.. image:: ../_static/img/get-started/introduction/bentoml-in-ml-workflow.png
In a typical ML workflow, you may need to prepare the data for your model, train and evaluate the model, serve the model in production, monitor its performance, and retrain the model for better inferences and predictions. BentoML features a streamlined path for transforming an ML model into a production-ready model serving endpoint.

The following is the basic workflow of using the BentoML framework.

Expand Down
2 changes: 1 addition & 1 deletion docs/source/guides/deployment.rst
Expand Up @@ -8,7 +8,7 @@ If you want to deploy your BentoML project in environments other than BentoCloud

To deploy a BentoML project on BentoCloud, do the following:

1. `Sign up here <https://www.bentoml.com/cloud>`_ for BentoCloud. You have will $30 free credits once you have your account.
1. `Sign up here <https://www.bentoml.com/cloud>`_ for BentoCloud. You will receive $30 free credits once you have your account.
2. Create an :doc:`API token with Developer Operations Access </bentocloud/how-tos/manage-access-token>` on the BentoCloud console.
3. Log in to BentoCloud. The login command will be displayed on the BentoCloud console after you create the token.
4. Deploy a project on BentoCloud. You can deploy the example project in :doc:`/get-started/quickstart` by running the following commands:
Expand Down