park-peter opened a new issue, #27187: URL: https://github.com/apache/airflow/issues/27187
### Apache Airflow Provider(s) salesforce ### Versions of Apache Airflow Providers apache-airflow-providers-amazon==5.1.0 apache-airflow-providers-apache-hive==4.0.0 apache-airflow-providers-apache-livy==3.1.0 apache-airflow-providers-celery==3.0.0 apache-airflow-providers-cncf-kubernetes==4.3.0 apache-airflow-providers-common-sql==1.2.0 apache-airflow-providers-databricks==3.2.0 apache-airflow-providers-dbt-cloud==2.1.0 apache-airflow-providers-elasticsearch==4.2.0 apache-airflow-providers-ftp==3.1.0 apache-airflow-providers-google==8.3.0 apache-airflow-providers-http==4.0.0 apache-airflow-providers-imap==3.0.0 apache-airflow-providers-microsoft-azure==4.2.0 apache-airflow-providers-postgres==5.2.1 apache-airflow-providers-redis==3.0.0 apache-airflow-providers-salesforce==5.1.0 apache-airflow-providers-sftp==4.0.0 apache-airflow-providers-slack==5.1.0 apache-airflow-providers-snowflake==3.2.0 apache-airflow-providers-sqlite==3.2.1 apache-airflow-providers-ssh==3.1.0 ### Apache Airflow version 2.4.1 ### Operating System bullseye 11 ### Deployment Astronomer ### Deployment details _No response_ ### What happened When adding salesforce connection in URI or JSON format, the documentation states that the extras should be passed as parameters, i.e. `security_token` or `instance_url`, into this format: `http://your_username:your_password@https%3A%2F%2Fyour_host.lightning.force.com?security_token=your_token`. However, the provider is actually saving the connection with extras with extra__salesforce__ prefix, i.e. `salesforce://your_username:your_password@/?extra__salesforce__security_token=your_token`. When saving it as a JSON format, we have to format the connection as: ```json "extra": { "extra__salesforce__security_token": "your_token", "extra__salesforce__instance_url": "your_host", } ``` This is not consistent with the documentation and the way other providers save their connection. It is causing a lot of confusion when saving the connection info in URI/JSON format, especially when trying to save this info on an alternative secrets backend. ### What you think should happen instead The URI should not have extra params with the `extra__salesforce__` prefix. ### How to reproduce Save Salesforce connection from Airflow UI and print out the URI using ```py conn = BaseHook.get_connection(conn_id=conn_id) print(conn.get_uri()) ``` ### Anything else _No response_ ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
