How to deploy / build Cumulocity web app with public /anonymous access

Hi,

I would like to deploy an app to Cumulocity containing documentation, openapi spec for user without requiring authentication.

How can I achieve this?

P.S. the link found in another topic isn’t valid any longer.

–Christof

Hi @Christof_Strack,

The documentation of the 2024 yearly release still covers what you have linked: Tutorials - Cumulocity Release 2024 documentation

But there is actually no need for a hardcoded user in case you do not want to interact with any APIs of Cumulocity.

In case you want to use the Web SDK for that application there is a noLogin application option (see: codex) that will stop redirecting you to the login app in case that app is opened directly.

To be honest your usecase is not really clear to me, why would you want to show a user the OpenAPI spec if he is unable to login and actually use these APIs?

And for logged in users there is already a solution to view the OpenAPI spec exposed by microservices:

Regards,
Tristan

The customer wants to host OpenAPI specs:

  1. for customs applications deployed as Cumulocity Microservice
  2. for external applications not deployed as Cumulocity Microservice

These OpenAPI specs should be accessible for client applications/ developers without authentication.

–Christof

As we still have the policy thate all microservices requests (in your case mainly GET Requests) must be authenticated, this is currently not possible.

The only way can think of by hardcoding an user in a webapp which has ONLY access to this microservice and OpenAPI endpoints (must be implemented and checked by the microservice) as a kind of proxy.

User → proxy Web App with hardcoded user → Microservice endpoint of Open API.