# EHRbase Swagger Username, Password & FHIR Integration **Category:** [Platform](https://discourse.openehr.org/c/platform-implem/7) **Created:** 2023-04-05 12:12 UTC **Views:** 1443 **Replies:** 9 **URL:** https://discourse.openehr.org/t/ehrbase-swagger-username-password-fhir-integration/3814 --- ## Post #1 by @Aravindh Hey all, I am new to OpenEHR. I wanted to take the Datas from OpenEHR through FHIR. I wanted to understand how OpenEHR Works. I have exported Archetypes from Clinical knowledge manager. And uploded into the Archetype Builder and created a templates and have exported the templates now. I have also installed EHR base using docker compose up using .yml file. When i tried to open the Swagger page of EHR base it asks me user name and password. I have tried entering the user names and passwords from the .yml file and it doesn't work. I have attached an image below for your reference. ![image|689x389](upload://ygk0mP82iSLYTGTsyLWyrzKQmfa.png) Kindly can anyone tell me what will be the user name and password? I also wanted to know how to take datas through FHIR from Open EHR using Postman. So that i can implement the same using languages like python. @Sidharth_Ramesh @ian.mcnicoll --- ## Post #2 by @ian.mcnicoll I got this working with the default username and password in the .env file SECURITY_AUTHUSER=ehrbase-user SECURITY_AUTHPASSWORD=SuperSecretPassword ![image|690x442](upload://945uN3xWMEOmfIVNkpObqbJhtgy.jpeg) --- ## Post #3 by @Aravindh Hi @ian.mcnicoll , Thank you for the quick response. I have figured this out earlier and sorted it out. Kindly can u help me with the FHIR bridge used in the EHR base and how to use and implement it? Best Regards, Aravindh RN --- ## Post #4 by @sebastian.iancu In case you need it, here is the link of [documentation for EHRbase FHIR Bridge](https://ehrbase.readthedocs.io/en/latest/06_fhir_bridge/index.html). --- ## Post #5 by @Sidharth_Ramesh Hey @Aravindh I'd suggest you understand how to use the openEHR SDK by EHRbase first. The FHIR bridge includes a few examples of how a FHIR facade can be built on top of an openEHR CDR, however, your use case may be different from what they've implemented. Which FHIR Profile are you trying to implement with openEHR? If it's India's ABDM, then the FHIR bridge is not required since you don't need a FHIR REST API to begin with. --- ## Post #6 by @SevKohler Well what do you exactly need the bridge for if i may ask. The fhir bridge offers no conversion from openEHR into FHIR. Only the other way around. --- ## Post #7 by @martijn.vanderavoort Hi all, I have also problems accessing http://...:8080/ehrbase/swagger-ui.html. I installed EHRbase with Docker on a AWS 2023 server. I am using the default security settings with basic authentication and the default usernames and passwords. However, each time I log in the pop-up returns. If I cancel the popup I get a 401 error. Any ideas on what I am missing? Best regards, Martijn --- ## Post #8 by @vidi42 By default, all the endpoints the application exposes are behind the enabled authentication method. The swagger-ui does some calls to the backend and I don't think it passes the authorization from the browser alongside. My suggestion is that you call the `ehrbase/v3/api-docs` endpoint from a REST client tool using the basic authorization and then just place the API definition in the [Swagger Editor](https://swagger.io/tools/swagger-editor/) --- ## Post #9 by @martijn.vanderavoort Hi, that has not the desired result. I also tried using curl in the console but even then I receive the 401 error. --- ## Post #10 by @ian.mcnicoll [quote="martijn.vanderavoort, post:7, topic:3814"] http://…:8080/ehrbase/swagger-ui.html [/quote] Swagger is working fine for me at http://localhost:8080/ehrbase/swagger-ui/index.html deployed locally with docker compose with our slightly changed .env.ehrbase file login: ehrbase-user password:SuperSecretPassword ``` SERVER_NODENAME=freshehr.ehrbase.org SECURITY_AUTHTYPE=BASIC SECURITY_AUTHUSER=ehrbase-user SECURITY_AUTHPASSWORD=SuperSecretPassword SECURITY_AUTHADMINUSER=ehrbase-admin SECURITY_AUTHADMINPASSWORD=EvenMoreSecretPassword SECURITY_OAUTH2USERROLE=USER SECURITY_OAUTH2ADMINROLE=ADMIN SPRING_SECURITY_OAUTH2_RESOURCESERVER_JWT_ISSUERURI= MANAGEMENT_ENDPOINTS_WEB_EXPOSURE=env,health,info,metrics,prometheus MANAGEMENT_ENDPOINTS_WEB_BASEPATH=/management MANAGEMENT_ENDPOINT_ENV_ENABLED=false MANAGEMENT_ENDPOINT_HEALTH_ENABLED=false MANAGEMENT_ENDPOINT_HEALTH_DATASOURCE_ENABLED=false MANAGEMENT_ENDPOINT_INFO_ENABLED=false MANAGEMENT_ENDPOINT_METRICS_ENABLED=false MANAGEMENT_ENDPOINT_PROMETHEUS_ENABLED=false MANAGEMENT_ENDPOINT_HEALTH_PROBES_ENABLED=false SYSTEM_ALLOW_TEMPLATE_OVERWRITE=true ADMINAPI_ACTIVE=true ADMINAPI_ALLOWDELETEALL=true% ``` --- **Canonical:** https://discourse.openehr.org/t/ehrbase-swagger-username-password-fhir-integration/3814 **Original content:** https://discourse.openehr.org/t/ehrbase-swagger-username-password-fhir-integration/3814