in order to load and auth user from multiple system, the HttpSecurity (`rg. springframework. security. config. annotation. web. builder`) or AuthenticationManager can concatenate multiple provider and user service, like
alternatively
in order to load and auth user from multiple system, the HttpSecurity (`rg. springframework. security. config. annotation. web. builder`) or AuthenticationManager can concatenate multiple provider and user service, like
alternatively
within the IDE, the specific block could be excluded from formatting via
so code like this wont be formatted:
//@formatter:off
while ssh into the container, it could fail opening the ssh connection.
the status of ssh enablement could be checked and enabled.
--check whether ssh is enabled
cf ssh-enabled <APP>
--enable app ssh
cf enable-ssh <APP>
follow up to https://lwpro2.wordpress.com/2011/09/20/maven-multi-module/
for maven multi module project with both front end and back end, there are two ways to run the app:
//for example, for angular, this could be
//package.json
"run_local": "ng serve --proxy-config proxy.conf.json"
//where proxy.config.json would be
{
"/api":
{
"target": "http://localhost:3000",
"secure": false
}
}
//or
{
"/api":
{
"port": "3000",
"secure": false
}
}
source:
front end proxy: https://create-react-app.dev/docs/proxying-api-requests-in-development/
https://angular.io/guide/build#proxying-to-a-backend-server
2. if it’s packaged(uber jar)/not-exploded or to run both front end and backend in single process whether exploded or not, then the front end can be built (with the assets moved either static/public:
Spring Boot comes with a pre-configured implementation of ResourceHttpRequestHandler to facilitate serving static resources.
By default, this handler serves static content from any of the /static, /public, /resources, and /META-INF/resources directories that are on the classpath.
), which can packaged as a separate jar for example. As long as the /static, /public folder is top level at the jar
as such, when backend (spring boot application start), it (the embedded tomcat for example) would serve both the backend (spring MVC) and front end (through above: ResourceHttpRequestHanlder).
ref: https://ashokgurudayal.hashnode.dev/multi-module-projects-and-packaging-frontend-backend-together
when maven package the jar, the /static folder would become top level of the package (/target/classes are removed)
ref: https://ashokgurudayal.hashnode.dev/multi-module-projects-and-packaging-frontend-backend-together
i have face a lot of issues connecting sap cloud foundry from cf cli. the issue includes, failed authentication, unauthorized, locked password etc.
the solution, turns out is to use `
`cf login –sso, which would use the temporary authentication code from the API, which worked.
source:
https://community.sap.com/t5/technology-q-a/cloud-foundry-login-error/qaq-p/12477996
there is a trick in the AppSpec.yml file when using code deploy to push the deployment to ECS. the TaskDefinition should be “<TASK_DEFINITION> this will be replaced by codeDeploy.
placeholder replaced by code deploy
for git ssh connection to AWS code commit, after uploading the public key, the trick is to have a specific config file to tell the user/public_key_id to associate with code commit
run `cat ~/.ssh/id_rsa.pub| pbcopy
`
2. add the special conf file
3. then run ssh git-codecommit.us-east-2.amazonaws.com for testing
ref: https://docs.aws.amazon.com/codecommit/latest/userguide/setting-up-ssh-unixes.html
when creating a S3 event notification to SNS, the AWS throw out an error saying
turns out this is due to the access policy on SNS, which needs to be updated to point to the right S3 bucket.
After correcting the policy, it worked.
to test the http connection over TCP, first establish the TCP connection, then issue the GET command
with telnet similar to NC:
when creating security group using aws cli, the VPC could be specified using “–vpc-id vpc-xxx, otherwise, it will use the default VPC.
after the sg is created, to set up the inbound rules, the parameter to specify the sg is through “–group-id, if using –group-name it would result in “The security group does not exist in default VPC”. And there is no parameter to specify the VPC.