single-sign-onoktaasciidocasciidoctorantora

How to integrate OKTA SSO with Antora generated pages?


I am trying to integrate OKTA (Single Page Application) with generated docs of Antora. Using ‘antora’ command it creates generated html files. How do I include OKTA integration across all pages? I tried checking on extensions and include but it doesn’t seem to work.


Solution

  • Antora generates a static web site. Okta integration requires dynamic logic in an application to handle the OAuth flow from Okta.

    So, instead of simply hosting the Antora-generated HTML on a web server, you'd need to host a web application that serves the Antora-generated HTML if (and only if) the Okta authentication has succeeded. You would also need to implement the login form, logout capability, and the OAuth callback endpoint required to authenticate with Okta.

    Antora cannot help you at all with the web application.

    If you're thinking that Okta authentication can be handled with JavaScript, and that the page content would be hidden if the user doesn't have an Okta cookie, that won't work. Users can disable JavaScript in their browsers, and so your authentication logic wouldn't run and they'd have full access to the page content. An authentication implementation that can be turned off by the user is no good at all.