You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I hope this message finds you well. 🌟 I wanted to share some required updates regarding the Astra CLI connection code.
🚀 I recently encountered an AuthenticationError while using this repository, and after some investigation, I discovered that your team had recently improved the database security policies. 💪
Because of which now support for username and password auth is over so for that I have updated this repo code that is working and is according to the latest best practises.
The code is tested and running successfully
It would be a great honour for me if you would please merge and it and it will save other developers time as well. Thanks.
🌐 Documentation Reference:
To find out more about these exciting security enhancements and how to handle them gracefully, I referred to the helpful documentation provided by DataStax. 📖 You can check it out here: Manage Application Tokens - Astra Docs.
👨💻 Identifying the Issue:
The error message indicated that the existing connection code required some updates to comply with the latest security policies. Upon closer inspection, I found that the client authentication process needed to be revised to accommodate the new changes. And support for username and password auth is over so for that I found it helpful for others to share my code.
💡 The Fix:
After thorough research and experimentation, I successfully updated the Astra CLI connection code to adapt to the enhanced security requirements. 🔧. And use the authentication tokens instead of the removed user name and passsword authentication.
✨ The Improved Connection:
constcassandra=require("cassandra-driver");// This is the Zip file you downloadedconstSECURE_CONNECT_BUNDLE='/workspace/crud-with-python-and-node/crud-nodejs/creds.zip';// Your Astra-specific credentials and keyspace// Here is the fix where i have used the Token Authentication instead of the username and password authentication because of the updated policy by Cassandra DB.constCLIENT_ID="kxPbavsfqWoZaBxqHceZxxeq";constCLIENT_SECRET="tCP7.jnWxa1YHyxsblH4nd2ymsct9UgZj+RxF6d0ruKB1f,z-EdPOL3b2K4w6OQkhdMbkoCMk77D4sNuqXXe4TBRvuLDQS3wkwuTY8uk-5sb+ELC0d8Wws.GCSWPmqe4";constKEYSPACE="spacecraft";// Init the connection and return the clientfunctioninit_connection(){varconnection={};connection.client=newcassandra.Client({cloud: {secureConnectBundle: SECURE_CONNECT_BUNDLE},keyspace: KEYSPACE,authProvider: newcassandra.auth.PlainTextAuthProvider(CLIENT_ID,CLIENT_SECRET),});returnconnection;}connection=init_connection();module.exports=connection;
🎉 Ready for Your Review!
I am thrilled to share this updated connection code with you, and I am confident that it complies with the latest security policies. 🔒 I believe this fix will ensure a seamless and secure experience for all Astra CLI users. And it will save great time for newbies and begginer developers.
🙏 Request for Your Review:
I would be extremely grateful if the DataStax Team could kindly review this updated code and consider accepting the pull request. Your expert feedback and approval would mean a lot to the Astra CLI community, and it would signify a successful collaboration towards maintaining top-notch security standards. 🌟
Thank you for your time and consideration! 🙌 If you have any questions or require further clarifications, please do not hesitate to reach out. I am eager to contribute to the Astra CLI and make it even more secure and efficient for users worldwide. 🌍
Looking forward to your response and hoping for a positive outcome! 🚀
The text was updated successfully, but these errors were encountered:
bilalmohib
changed the title
AuthenticationError: We recently improved your database security. Error On Running Database connection and first exercise in nodejs
AuthenticationError: Improved database security. Error On Running Database connection and first exercise in nodejs
Dec 26, 2023
Uh oh!
There was an error while loading. Please reload this page.
🚀 AuthenticationError: DataStax recently improved your database security. Error On Running Database connection and first exercise in nodejs 🚀
🔒 AuthenticationError: As you've Strengthened Your Database Security I have updated your database conn code!
Here is the link to the pull request:- pull request database conn error fix
Hello DataStax Team! 👋
🌐 Documentation Reference:
To find out more about these exciting security enhancements and how to handle them gracefully, I referred to the helpful documentation provided by DataStax. 📖 You can check it out here: Manage Application Tokens - Astra Docs.
👨💻 Identifying the Issue:
The error message indicated that the existing connection code required some updates to comply with the latest security policies. Upon closer inspection, I found that the client authentication process needed to be revised to accommodate the new changes. And support for username and password auth is over so for that I found it helpful for others to share my code.
💡 The Fix:
After thorough research and experimentation, I successfully updated the Astra CLI connection code to adapt to the enhanced security requirements. 🔧. And use the authentication tokens instead of the removed user name and passsword authentication.
✨ The Improved Connection:
🎉 Ready for Your Review!
I am thrilled to share this updated connection code with you, and I am confident that it complies with the latest security policies. 🔒 I believe this fix will ensure a seamless and secure experience for all Astra CLI users. And it will save great time for newbies and begginer developers.
🙏 Request for Your Review:
I would be extremely grateful if the DataStax Team could kindly review this updated code and consider accepting the pull request. Your expert feedback and approval would mean a lot to the Astra CLI community, and it would signify a successful collaboration towards maintaining top-notch security standards. 🌟
Thank you for your time and consideration! 🙌 If you have any questions or require further clarifications, please do not hesitate to reach out. I am eager to contribute to the Astra CLI and make it even more secure and efficient for users worldwide. 🌍
Looking forward to your response and hoping for a positive outcome! 🚀
Best regards,
Muhammad Bilal
Muhammad-Bilal-7896
The text was updated successfully, but these errors were encountered: