KeystoneJS can't logged admin UI by the generated password - keystonejs

I am running KeystoneJS app locally by docker-compose and mongodb.
After I run docker-compose up to start the application, all goes well, I can acess the link by
http://localhost:3000/admin,
but I can't log in by the generated password:
✔ Connected to database
my-admin | - Preparing to accept requests
my-admin |
my-admin |
my-admin | User created:
my-admin | email: admin#example.com
my-admin | password: 30d234be8ee9
my-admin | Please change these details after initial login.
my-admin |
my-admin | ✔ Keystone instance is ready at http://localhost:3000 🚀
my-admin | 🔗 Keystone Admin UI: http://localhost:3000/admin
my-admin | 🔗 GraphQL API: http://localhost:3000/admin/api
After press the sign in, there are 3 requests:
POST 200
GET 304
GET 304
Here is the log:
| {"level":30,"time":1576853673666,"pid":36,"hostname":"5759ebc8fe99","req":{"id":50,"method":"GET","url":"/__webpack_hmr","headers":{"host":"localhost:3000","connection":"keep-alive","accept":"text/event-stream","cache-control":"no-cache","user-agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36","sec-fetch-site":"same-origin","sec-fetch-mode":"cors","referer":"http://localhost:3000/admin/users?fields=_label_%2Cname%2Cemail%2CisAdmin","accept-encoding":"gzip, deflate, br","accept-language":"en-GB,en-US;q=0.9,en;q=0.8"},"remoteAddress":"::ffff:172.20.0.1","remotePort":34154},"res":{"statusCode":404,"headers":{"x-powered-by":"Express","x-keystone-app-version":"1.0.0","vary":"Origin, Accept-Encoding","access-control-allow-credentials":"true","content-security-policy":"default-src 'none'","x-content-type-options":"nosniff","content-type":"text/html; charset=utf-8","content-length":152}},"responseTime":1,"msg":"request completed","v":1}
And the generated password part should be from here
const initialiseData = require('./initial-data');
Thanks for any help!

Disable SSL works for local testing.
secureCookies: false

Related

HTTP ERROR 401 Unauthorized when access ActiveMQ admin console

I installed ActiveMQ version 5.17.0, and I start it by using the CMD on Windows. It started, but when I access the admin console it shows 401 error message without popup to enter username/password.
This is the log when starting:
INFO | Connector stomp started
INFO | Listening for connections at: mqtt://VN-PF2MF5K6:1883?maximumConnections=1000&wireFormat.maxFrameSize=104857600
INFO | Connector mqtt started
INFO | Starting Jetty server
INFO | Creating Jetty connector
WARN | ServletContext#o.e.j.s.ServletContextHandler#40e60ece{/,null,STARTING} has uncovered http methods for path: /
INFO | Listening for connections at ws://VN-PF2MF5K6:61614?maximumConnections=1000&wireFormat.maxFrameSize=104857600
INFO | Connector ws started
INFO | Apache ActiveMQ 5.17.0 (localhost, ID:VN-PF2MF5K6-51292-1660105581127-0:1) started
INFO | For help or more information please see: http://activemq.apache.org
INFO | ActiveMQ WebConsole available at http://127.0.0.1:8161/
INFO | ActiveMQ Jolokia REST API available at http://127.0.0.1:8161/api/jolokia/
And when I access the admin console at localhost:8161/admin
HTTP ERROR 401 Unauthorized
URI: /admin
STATUS: 401
MESSAGE: Unauthorized
SERVLET: -
How can I resolve it?

SIM800l Httpaction. Can't get 0,200 or 0,200

I'm playing with HTTP GET and POST methods and I have problem. My problem is next one: Last week my GET method was work perfect and then suddenly stop working. Problem occur because MCU can't got response in this format: 0,200,xxx. Code is identical 100%. MCU always got this response: 0,603 (DNS error). Next commands and responses I send/receive to/from SIM800l:
Signal strength | at command: AT+CSQ | response +CSQ: 20,0
Full functionality | at command: AT+CFUN=1 | response OK
If bearer is open send | at command: AT+SAPBR=0,1 | response OK
Otherwise do nothing
Set bearer for gprs | at command: AT+SAPBR=3,1,"CONTYPE","GPRS" | response OK
Set APN | at command: AT+SAPBR=3,1,"APN","internet" | response OK
Set USERNAME | at command: AT+SAPBR=3,1,"USER","telenor" | response OK
Set PASSWORD | at command: AT+SAPBR=3,1,"PWD","gprs" | response OK
Is bearer opened | at command: AT+SAPBR=2,1 | response +SAPBR: 1,3,"0.0.0.0"
Open bearer | at command: AT+SAPBR=1,1 | response OK
Init http | at command: AT+HTTPINIT | response OK
Enable SSL | at command: AT+HTTPSSL=1 | response OK
Set profile identifier | at command: AT+HTTPPARA="CID",1 | response OK
Set url | at command: AT+HTTPPARA="URL","https://mondo.rs/" | response OK
Set GET action | at command: AT+HTTPACTION=0 | response 0,603,0
When I got this response I send again same at command, and result is same (sometimes response from SIM800l is 0,604,0). I use laboratory psu ( which is stable and enough for SIM800l).
Stiil I can send SMS, read all messages,.. without problem. What can be problem?
I find solution for problem, mainly sim800l need firmware upgrade.
Follow steps:
Download SIM800_Series_download_Tools_Customer_v1.19.rar(for win) https://simcom.ee/documents/?dir=SIM800x and driver MTK_USB_DRIVER.rar
Look what firmware is currently on sim800 with AT+CGMR, my firmware was 1418B02SIM800L24. Here B02 is interested for us.
sim800l have 2 different hardware models L16 and L24. If your firmware version have L16 on the end of firmware mark download new firmware from https://simcom.ee/documents/?dir=SIM800L. Otherwise (L24) download new firmware from https://letmeknow.fr/blog/2018/01/09/tuto-update-firmware-sim8xx/. I know that is French blog but only there I find firmware for sim800l model L24. After uploading new firmware and calling AT+CGMR you will get 1418B05SIM800L24. So now firmware version is B05 and you can send(get) messages to the web-sites without problem.
Don't forget that this module is 2G and receiving characters from modern https web-site will take some time (a few tenths of a second).

How to use Patator to brute force HTTP Basic Auth

I'm doing some password cracking experiments with different tools. I've a local set up within VMWare Workstation. I have a website protected by HTTP Basic Auth (A dialog pops up when i browse to it).
I'm struggling with the syntax of Patator though - I cant make it brute force the website (tools like Ncrack and Hydra worked OK). I have used it for SSH so i know the tool works, just can't figure the command for HTTP Basic Auth
patator http_fuzz auth_type=basic url=http://10.1.1.15 user_pass=FILE0:FILE0 0=./passwd_lists/user_pass.txt -x ignore:code=401
Where user_pass.txt contains a 'username':'password' separated by a colon
Basic Auth password is '123' and the user_pass.txt contain all permutations from 000 - 999, the username is consistent throughout. I can see Patator making 1000 attempts however they all fail with a HTTP 401
11:26:27 patator INFO - 401 672:456 0.001 | molly:969 | 970 | HTTP/1.1 401 Unauthorized
11:26:27 patator INFO - 401 672:456 0.001 | molly:979 | 980 | HTTP/1.1 401 Unauthorized
11:26:27 patator INFO - 401 672:456 0.001 | molly:989 | 990 | HTTP/1.1 401 Unauthorized
11:26:27 patator INFO - 401 672:456 0.001 | molly:999 | 1000 | HTTP/1.1 401 Unauthorized
11:26:28 patator INFO - Hits/Done/Skip/Fail/Size: 1000/1000/0/0/1000, Avg: 732 r/s, Time: 0h 0m 1s
I think i have the command syntax incorrect, any help really appreciated.
Thanks
Turns out i had the syntax incorrect, my user name and password were colon separated in one file, so the syntax should be
patator http_fuzz auth_type=basic url=http://10.1.1.15 user_pass=FILE0 0=./passwd_lists/user_pass.txt -x ignore:code=401
The difference being the single reference to to FILE0

Connecting to Kerberized solr on cloudera from karaf

I'm trying to connect to Solr (non cloud) which has Kerberos enabled from my SolrJ application running in Karaf container.
With Kerberos disabled, I'm able to connect fine.
With Kerberos enabled, I'm able to connect outside of Karaf by running a simple SolrClient class.
But its not working from within karaf.
Code:
System.setProperty("java.security.auth.login.config", "<path to jaas.conf file>");
String urlString = "http://<IP>:8983/solr/test";
SolrServer server = new HttpSolrServer(urlString);
QueryResponse sresponse = server.query( squery );
Exception in Karaf on trying to query:
2016-12-15 15:02:17,969 | WARN | l Console Thread | RequestTargetAuthentication | ? ? | 271 - wrap_mvn_org.apache.httpcomponents_httpclient_4.3.2 - 0.0.0 | NEGOTIATE authentication error: No valid credentials p
rovided (Mechanism level: No valid credentials provided (Mechanism level: Invalid option setting in ticket request. (101)))
2016-12-15 15:03:10,731 | ERROR | l Console Thread | Error:org.apache.solr.client.solrj.impl.HttpSolrServer$RemoteSol
rException: Expected mime type application/octet-stream but got text/html. Apache Tomcat/6.0.44 - Error report HTTP Status 401 - Authentication requiredtype Status reportmessage Authentication requireddescription This request requires HTTP authentication.Apache Tomcat/6.0.44

Error Status of the Server created with OpenStack Compute Api

POST request for creating the OpenStack instance
curl -g -i -X POST http://Controller_ip:8774/v2/tenant_id/servers -H "User-Agent: python-novaclient" -H "Content-Type: application/json" -H "Accept: application/json" -H "X-Auth-Token: token_id" -d '{"server": {"name": "viki_test_instance", "imageRef": "image_id", "flavorRef": "1", "max_count": 1, "min_count": 1, "networks": [{"uuid": "public interface"}], "security_groups": [{"name": "default"}]}}'
Response to the Request
HTTP/1.1 202 Accepted
Content-Length: 438
Location: http://Controlle-ip:8774/v2/tenant-id/servers/image-id
Content-Type: application/json X-Compute-Request-Id:
req-92a46827-1200-4084-bc4e-7c74a9d6f671 Date: Tue, 27 Dec 2016
06:19:10 GMT
{"server": {"security_groups": [{"name": "default"}],
"OS-DCF:diskConfig": "MANUAL", "id": "image-id", "links": [{"href":
"http://controller-ip:8774/v2/tenant-id/servers/image-id", "rel":
"self"}, {"href":
"http://Controller-ip:8774/tenant-id/servers/image-id", "rel":
"bookmark"}], "adminPass": "8vCSQzmf6uwu"}}
Results:
The instance got created with the particular name of the OpenStack tenant and also was listed in the openstack server list command
Problem:
The status of the instance is showing ERROR
I am able to create the instance via openstack server create command and horizon dashboard.
openstack server create --image Ubuntu-14.04-Trusty --flavor m1.small --nic net-id=214a5016-c2e1-47e2-aec3-fcdcdec9e939 viki_test_instance1
nova-api.log shows,
The first log shows to upgrade the glance version but I doubt that is a solution as my other services such the openstack cli and horizon dashboard are able to create the instance.
Need help in debugging this issue.
#dvigneshwer: Thanks for the hint. It did work for me. In my case I am not sure how but the image created with cirros was wrong. I downloaded a new image and then added this image to glance, then created my server and it did work.
+--------------------------------------+--------------------------+--------+
| ID | Name | Status |
+--------------------------------------+--------------------------+--------+
| af6bf068-0997-4711-bf49-5ba44e986d9d | cirros | active |
| dcad76ef-210e-4cee-b4f0-139c0f1cd1f7 | cirros-0.3.5-x86_64-disk | active |<-- Some issue with this Image. So deleted this.
+--------------------------------------+--------------------------+--------+