Jenkins on AWS: No valid crumb was included in the request - amazon-web-services

I have just set up Jenkins (v2.69) on an AWS EC2 instance and I am accessing it through a web browser (Chrome).
However, when reaching the 'Create First Admin User' page, when I click save and finish I am hit with the following issue.
No valid crumb was included in the request
And also receive this from the console:
Failed to load resource: the server responded with a status of 403 (No valid crumb was included in the request)
Is there something I am missing or have not set up?
I've been following this tutorial

Follow the following steps to avoid the error:
change to Jenkins user by using the following command
su – Jenkins –s /bin/bash
go to the config.xml and comment out the crumbIssuer from
/var/lib/Jenkins/config.xml:

Related

SAML error with Kubernetes: ‘InResponseToField of the Response doesn’t correspond to sent message’

I am having a recurring issue with shinyproxy (currently 2.5.0 - based on Springboot) hosted within a kubernetes cluster (currenty a single node). I'm using Auth0 with SAML. Traffic goes through a Nginx ingress controller that does TLS termination and has a fairly basic configuration. What I don't understand is that I will get the following error, but only once in a while. If I try to login, I will get the error, but then after that, if I go back to the login page and try to log in again, everything works fine.
o.s.security.saml.log.SAMLDefaultLogger : AuthNResponse;FAILURE;[Auth0 URN];;;org.opensaml.common.SAMLException: InResponseToField of the Response doesn't correspond to sent message a12g399012cidi7i2i3ha3ha4h6e6jc
at org.springframework.security.saml.websso.WebSSOProfileConsumerImpl.processAuthenticationResponse(WebSSOProfileConsumerImpl.java:175)
at org.springframework.security.saml.SAMLAuthenticationProvider.authenticate(SAMLAuthenticationProvider.java:88)
at org.springframework.security.authentication.ProviderManager.authenticate(ProviderManager.java:199)
at org.springframework.security.authentication.ProviderManager.authenticate(ProviderManager.java:219)
...
This made me think of a cookies problem, however adjusting the shinyproxy server/proxy configuration for cookies did not change anything. Shinyproxy configuration has:
server:
secure-cookies: true
proxy:
same-site-cookie: None
In the browser when I try to log in I get the following error message:
Error
Status code: 200
Message: Error validating SAML message
Stack Trace:
org.springframework.security.authentication.AuthenticationServiceException: Error validating SAML message
...
Anyone has an idea of what I am missing? I would really appreciate it! Thank you!

Can't put onesignal service worker js files in root in github

I have used github-pages to publish my site. I'm trying to use onesignal there. But I can't store the sdk files in the root. I'm getting this console error.
Installing service worker failed TypeError: Failed to register a ServiceWorker for scope ('https://username.github.io/') with script ('https://username.github.io/OneSignalSDKWorker.js?appId=<MY_APP_ID>'): A bad HTTP response code (404) was received when fetching the script.
A 404 means the service worker script is not where the SDK thinks it is. Try visiting the URL in your browser (https://username.github.io/OneSignalSDKWorker.js). You should see the script there. If it is not there, you have not successfully hosted the required file.

When I access Jenkins trough an EC2 I get an error

I got an issue. I created a Jenkins AMI that i snapshoted it and created an image from a running ec2 instance with an already configured Jenkins Master on port 8443 with an https certificate. But when I curl to the jenkins instance i get the following:
[1]: https://i.stack.imgur.com/K2tz0.png
I checked Jenkins logs and everything was normal. And my Elatic Load balancer is healthy which means the security groups and other things are working just fine. Does anybody have a clue why is it giving a 403 Forbidden? Another point is that I can even access the GUI
By using curl you're making your life harder but look at some of what comes back:
<meta http-equiv='refresh' content='1;url=/login?from=%2F'/>
If you've done HTML programming, this is one way of having the browser execute a redirect. Why Jenkins doesn't do some sort of HTTP redirect I don't know but the code is telling you that, after 1 second, redirect to the url /login.
curl isn't going to interpret the HTML for you, unlike the browser. Jenkins is working fine - you just need to follow what the HTML and JavaScript code is telling you to do through curl.
The 403 error is the Jenkins application specifically saying your current user is not allowed access to the current action.
It appears you’re not logged in so your action is treated as an anonymous user. If the anonymous user should have the permissions to access this action you will need to add them.

When trying to deploy my nodejs code to gcloud, the url I am deploying to gives a 502 error

First, when trying to deploy my code to the target url in gcloud, the deployment process hangs.
The target url has the suffix appspot.com.
When I ping the target url, I get a request timeout. When I type the target url in my browser, I get a 502 error: server error.
When I deployed the same code to a different test environment in dialogflow, everything seemed to work fine. However when I try deploying again to this url (it is the correct url obtained from the webhook fulfilment url in dialogflow), I get this error:
Updating service [default] (this may take several minutes)...failed.
ERROR: (gcloud.app.deploy) Error Response: [4] Timed out waiting for
the app infrastructure to become healthy.
Everything else, including the node js code and the dialogflow configurations are the same between the two environments I am deploying to, except for the webhook fulfilment url.
Does anyone know what the issue can be narrowed down to? And please let me know if I can include any more useful information.
My guess is that the server is down for that specific URL. One thing to note is that I am using V1 dialogflow.
Resolved, it ended up being a firewall issue for that specific url.

Amazon command line tool http error

I have amazon command line tool to post HITs to Mturk. But there seems to be a problem with the mturk URL in mturk.properties. It keeps asking for https.
I searched for the solution in aws forums, with most stating simply change the URL from http to https. I have tried and get the following error
An error occurred while fetching your balance: >javax.net.ssl.SSLPeerUnverifiedException: HTTPS hostname invalid: expected >'176.32.98.23', received 'mechanicalturk.amazonaws.com'