Forum Discussion

midhun_e's avatar
midhun_e
Cloud Apps
07-25-2025
Solved

Implementing web token access in spring boot

In this i tried to implement to render i-frame without login . 
Below i've attached my backend code for jwt token generation too.

@Service
public class SisenseTokenService {

// Use the Shared Secret from your Sisense Admin panel
private static final String SHARED_SECRET = "MY_secret_key";

public static String generateSisenseJWT(String userEmail) {
long nowEpoch = Instant.now().getEpochSecond();

return Jwts.builder()
.claim("sub", userEmail) // Sisense user email
.claim("iat", nowEpoch) // Issued At
.claim("jti", UUID.randomUUID().toString()) // Unique token ID
.signWith(SignatureAlgorithm.HS256, SHARED_SECRET.getBytes(StandardCharsets.UTF_8))
.compact();
}

}

output for token:

token:e

decoded:
{
  "sub": "[email protected]",
  "tenantId": "system",
  "iat": ,
  "jti": ""
}
in frontend - 

<iframe  src={`https://sisense-dev.cscs-apps.com/app/main/dashboards/686bca7cef95f60033490c63?embed=true&web_access_token=e`}

                width="100%"

                height="100%"

            />


still it is not working why? kindly help asap, it is an important blocker

  • Right now this task is on hold, because the WAT feature is disabled in our license once it is fixed will get back to this. Thanks for the info though.

4 Replies

  • Hi midhun_e​,

    Thank you for reaching out. I have removed some content that may have posed a security risk. For this kind of issue we recommend opening a support ticket. They will be able to help with this better than we can here.

  • AssafHanina's avatar
    AssafHanina
    Sisense Employee

    Hey midhun_e​ ,

    Are you trying to implement the Sisense Web Access Token (as mentioned in the title) but the code is for JWT token?
    in case the goal is implement Web Access Token (WAT), the 'sub' claim in WAT Is the user id and not the userEmail. 

    Additionally suggest to raise a support ticket as mentioned by DRay​

    • midhun_e's avatar
      midhun_e
      Cloud Apps

      Right now this task is on hold, because the WAT feature is disabled in our license once it is fixed will get back to this. Thanks for the info though.