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

Add instructions to securely manage token #2322

Merged
merged 68 commits into from
Nov 27, 2024
Merged
Changes from 1 commit
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
cab2eea
test twisty
abbycross Nov 14, 2024
f92740f
add info on env variable
abbycross Nov 14, 2024
8cf4f0f
add to functions intro page
abbycross Nov 14, 2024
880a541
squeaky
abbycross Nov 14, 2024
8e7b1bd
add separate section
abbycross Nov 15, 2024
929a1a0
tweak
abbycross Nov 15, 2024
6004777
restore IBM Cloud note
abbycross Nov 15, 2024
ca16e69
Update setup-channel.mdx
abbycross Nov 15, 2024
08377eb
Update docs/guides/setup-channel.mdx
abbycross Nov 18, 2024
5747749
Add tabs w/Runtime option
abbycross Nov 18, 2024
eb1b3a1
Apply suggestions from code review
abbycross Nov 18, 2024
602289c
Update docs/guides/functions.ipynb
abbycross Nov 18, 2024
6f5ed59
Update setup-channel.mdx
abbycross Nov 19, 2024
04285f9
rework page
abbycross Nov 19, 2024
05ec983
rmv ref to removed section
abbycross Nov 20, 2024
2973262
tweaks
abbycross Nov 20, 2024
a150476
rmv extra comments
abbycross Nov 20, 2024
d1f89a0
clarify default
abbycross Nov 20, 2024
215ab29
updates to the Platform section of the page
abbycross Nov 20, 2024
2b88216
redundant
abbycross Nov 21, 2024
ff129c2
bold
abbycross Nov 21, 2024
8b20e08
instructions for untrusted machine
abbycross Nov 21, 2024
d2451be
input from Vignesh
abbycross Nov 22, 2024
4aa4333
tweaks to iqp section
abbycross Nov 22, 2024
185939a
no need to italicize twice in a row
abbycross Nov 22, 2024
8e334db
first pass at REST API section
abbycross Nov 22, 2024
8d26470
test out subsection for REST API
abbycross Nov 22, 2024
c800067
Update docs/guides/setup-channel.mdx
abbycross Nov 26, 2024
b8df8c2
Update docs/guides/setup-channel.mdx
abbycross Nov 26, 2024
1f3d40d
move adm higher, rmv "or random", use original lang
abbycross Nov 26, 2024
0e18cd3
rmv "in plain text"
abbycross Nov 26, 2024
2bb59bf
add save_account() API link
abbycross Nov 26, 2024
f20da5a
copy paste code from account pg
abbycross Nov 26, 2024
b311aa2
fix indent
abbycross Nov 26, 2024
84de35b
rmv overwrite=True
abbycross Nov 26, 2024
e7acc27
separate into 2 blocks
abbycross Nov 26, 2024
8aeac62
tweaks
abbycross Nov 26, 2024
acc2bbd
updating wording on Functions pg
abbycross Nov 26, 2024
54a6c47
tox
abbycross Nov 26, 2024
7925905
Merge branch 'main' into ajc/update-install-instructions
abbycross Nov 26, 2024
c84195d
start fresh w serverless-manage-resources
abbycross Nov 26, 2024
d201682
rmv placeholder API text
abbycross Nov 26, 2024
9f34a79
comment in qunasys code
abbycross Nov 26, 2024
d3d602e
Update serverless-manage-resources.ipynb
abbycross Nov 26, 2024
1e59e09
add comments, remove placeholder text for api code
abbycross Nov 26, 2024
8374f06
add catalog back in
abbycross Nov 26, 2024
97b4f1d
more fix
abbycross Nov 26, 2024
5f31633
underscore
abbycross Nov 26, 2024
beb9434
tox
abbycross Nov 26, 2024
cb6b6fc
Apply suggestions from code review
abbycross Nov 27, 2024
b003b40
Update docs/guides/setup-channel.mdx
abbycross Nov 27, 2024
e0a952d
Update docs/guides/setup-channel.mdx
abbycross Nov 27, 2024
dbf79a9
Merge branch 'main' into ajc/update-install-instructions
abbycross Nov 27, 2024
6f5da2e
format a la iqp section
abbycross Nov 27, 2024
0be84fc
bring warning higher up in section
abbycross Nov 27, 2024
89ad0c0
break up line for readability
abbycross Nov 27, 2024
8c89b3e
Python to `python`
abbycross Nov 27, 2024
ee626fe
update untrusted language
abbycross Nov 27, 2024
57dbf4f
clarify refresh token language
abbycross Nov 27, 2024
a055c25
expire rather than rotate
abbycross Nov 27, 2024
c5a9851
what to do if you accidentally share token
abbycross Nov 27, 2024
dc974c2
tox
abbycross Nov 27, 2024
fe3ad1f
Update docs/guides/setup-channel.mdx
abbycross Nov 27, 2024
9eec6b9
Update docs/guides/setup-channel.mdx
abbycross Nov 27, 2024
cb4f46f
Update docs/guides/setup-channel.mdx
abbycross Nov 27, 2024
58a0205
pythonic
abbycross Nov 27, 2024
065dd39
Merge branch 'ajc/update-install-instructions' of https://github.com/…
abbycross Nov 27, 2024
9a14488
fix up token name
abbycross Nov 27, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions docs/guides/setup-channel.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,13 @@ Alternatively, you can also access quantum processors with REST APIs, enabling y
* Credentials are saved to `$HOME/.qiskit/qiskit-ibm.json`. Do not manually edit this file.
* If you don't save your credentials, you must specify them every time you start a new session.

1. <span id="cloud-untrusted"></span>**Avoid executing code on an external cloud Python environment to minimize security risks.** If you must use an untrusted environment (on, for example, a public computer), change your API token after each use by deleting it on the [API keys page](https://cloud.ibm.com/iam/apikeys) and creating a new one. To initialize the service in this situation, you can use code like the following:
1. <span id="cloud-untrusted"></span>**Avoid executing code on an external cloud Python environment to minimize security risks.** If you must use an untrusted environment (on, for example, a public computer), change your API token after each use by deleting it on the [API keys page](https://cloud.ibm.com/iam/apikeys) and creating a new one.

<Admonition type="caution">
**Protect your API token!** Never include your token in source code, Python script, or notebook file. When sharing code with others, ensure that your API token is not embedded directly within the Python script. Instead, share the script without the token and provide instructions for securely setting it up.
abbycross marked this conversation as resolved.
Show resolved Hide resolved
</Admonition>

To initialize the service in this situation, you can use code like the following:

```python
from qiskit_ibm_runtime import QiskitRuntimeService
Expand All @@ -286,9 +292,6 @@ Alternatively, you can also access quantum processors with REST APIs, enabling y
instance="<IBM Cloud CRN>"
)
```
<Admonition type="caution">
When sharing code with others, ensure that your API token is not embedded directly within the Python script. Instead, share the script without the token and provide instructions for securely setting it up.
</Admonition>

## Next steps

Expand Down