Hi All,
I am trying to deploy spring boot application in Jira cloud but when I keep atlassian-json file inside resource folder it works fine but if I keep it in another folder and provide that path than it’s not working. so how can we keep it outside?
@RestController
@RequestMapping("/atlassians")
@Component("AtlassianDefault")
public class AtlassianDefault {
@GetMapping(value = "", produces = MediaType.APPLICATION_JSON_VALUE)
public Map<String,Object> getAtlassian() {
String pathIN = AivApplication.REPOSITORYLOCATION_PATH + "/outside/atlassian-connect.json";
try {
if (Paths.get(pathIN).toFile().exists()) {
Map<String, Object> m = new ObjectMapper().readValue(Files.readAllBytes(Paths.get(pathIN)), new TypeReference<Map<String, Object>>() {
});
return m;
} else return null;
} catch (Exception e) {
return null;
}
}
If outside it gives below error:
2024-08-19 10:21:41,173 DEBUG org.springframework.security.authentication.DefaultAuthenticationEventPublisher [https-jsse-nio-443-exec-1] No event was found for the exception com.atlassian.connect.spring.internal.auth.jwt.UnknownJwtIssuerException
2024-08-19 10:21:41,176 WARN com.atlassian.connect.spring.internal.auth.jwt.JwtAuthenticationFilter [https-jsse-nio-443-exec-1] Failed to authenticate request
com.atlassian.connect.spring.internal.auth.jwt.UnknownJwtIssuerException: Could not find an installed host for the provided client key: 4c9d214a-0e94-31be-b935-0009eef5ae41
at com.atlassian.connect.spring.internal.auth.AbstractConnectAuthenticationProvider.lambda$getHost$0(AbstractConnectAuthenticationProvider.java:95)
at java.base/java.util.Optional.orElseThrow(Optional.java:403)
at com.atlassian.connect.spring.internal.auth.AbstractConnectAuthenticationProvider.getHost(AbstractConnectAuthenticationProvider.java:94)
Please help