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
(DOC) REST API authentication to a WCS cluster #1793
Comments
@bobvanluijt Any idea? |
Hi @eostis – in principle all the clients should work. Could it be the case that the 404 happens because of the creation of the instance? I.e., it takes some time to complete. Is this something you or somebody in your team recognizes @michaverhagen? PS: PPS: |
WCS is working. But I want to protect it with a token. How can I generate a token for a WCS cluster? |
Ooo – gotcha – @michaverhagen can you / your team help with the above question? |
I will ask someone to look into this |
Hi @eostis , do you use one of our In python all you need is the instance URL, which is from weaviate import Client, AuthClientPassword
credentials = weaviate.AuthClientPassword(
username='WCS_EMAIL',
password='WCS_PASSWORD'
)
weaviate_client = Client(
url='https://WCS_CLUSTER_NAME.semi.technology',
auth_client_secret=credentials,
) Now there is a workaround to get the print(weaviate_client._connection._auth_bearer) NOTE: The token has a lifespan of |
Hi @StefanBogdan Thanks for the help ! I tested with 2 clusters:
Conclusion: I'm back to square one ! |
Quick question @eostis, you said: "back to square one" I'm not sure I understand, you are now able to connect, no? |
I can connect, but only unauthenticated. WCS uses OIDC authentication (with a token I do not know how to generate), or no authentication (user/pwd is not necessary) |
@eostis , this is not entirely true, you can authenticate EITHER with a token OR with your WCS credentials. In this example, I showed you that you can connect to the WCS Weaviate cluster instance with your WCS credentials (since WSC does not allow configuring your OICD it uses the same for the console and the cluster): from weaviate import Client, AuthClientPassword
credentials = weaviate.AuthClientPassword(
username='WCS_EMAIL',
password='WCS_PASSWORD'
)
weaviate_client = Client( # Note that here we are creating a Client object
url='https://WCS_CLUSTER_NAME.semi.technology', # this is the cluster URL, where WCS_CLUSTER_NAME is the name of the instance you created
auth_client_secret=credentials,
) Let me know if this works. |
If the cluster is OIDC enabled, you need to send an OIDC (the email/password is not considered) |
Yes, and it is the same one used to Login to the console, i.e. the same one used to Login here: https://console.semi.technology/ NOTE: The created instance has also an authorization layer (if you enabled authentication), and by default only one user can access it, the creator of the instance. |
When you use username/password the python-client gets the token from the issuer (and updates it whenever it expires), so you do not need to get any tokens. |
Login to https://console.semi.technology/ requires an email/pwd, right? Where can I get the token? |
It should be listed in the Well Known OpenID configuration: https://YOUR_INSTANCE_NAME.semi.network/v1/.well-known/openid-configuration
|
oh!
is here to generate the token from my email/password. Is it? I guess I'll have to dig into the python's client code (I'm working with PHP). |
Yes. With this I am closing this Issue, feel free to open if needed. |
Here is what worked for me:
|
Hi,
I'm trying to connect to an authentication enabled WCS cluster, with the REST API (for WooCommerce owners who want to use WCS hosting rather than installing Weaviate).
Could you point me to the documentation ?
I received a 404 link after the cluster was created https://www.semi.technology/developers/weaviate/v1.8.0/configuration/authentication
I noticed the Enterprise token, but I do not think it is what I need.
https://www.semi.technology/developers/weaviate/current/configuration/authentication.html is only about self setup I suspect.
The text was updated successfully, but these errors were encountered: