Restricting access to particular URL for sesame server deployed on JBoss (WildFly 8.2) - jboss

I have a sesame server running deployed in a WildFly 8.2.0 final container.
How can I restrict access to some particular URLs?
I know I have to edit some XML files (deployment descriptor and some other files) but I don't know which files and where to find them.

I figured it out my self.
Step 1:
Open the openrdf-sesame.war with Total Commander or any file archiver. Go the WEB-INF folder and open the web.xml file.
Edit the web.xml file by adding constraints, roles and the login-config tag as in this example : http://www.rivuli-development.com/further-reading/sesame-cookbook/basic-security-with-http-authentication/
Save the edited file within the archive and redeploy the openrdf-sesame.war file containing the modified web.xml file.
Step 2:
Go to the WildFly folder and enter the bin directory and run the add-user.bat file.
Choose b) Application User and hit Enter.
Enter a username and a password for the new user.
When you are asked "What groups do you want this user to belong to?", type in one of the roles you have created in the web.xml file and hit Enter.
When asked “is this new user going to be used for one AS process to connect to another AS process?” type “yes” and hit Enter.
And that's all.
You now have youre particular URL's restricted.

Related

WildFly: jboss-cli's add module creates a wrong folder

I am taking my very first steps with WildFly application server. I want to create a database driver.
I had a look at https://www.adam-bien.com/roller/abien/entry/installing_oracle_jdbc_driver_on on how to do it manually. And now I want to do it by jboss-cli.sh. I read about these commands e. g. here and here.
So I am typing...
wildfly-26.0.0.Final/bin$ ./jboss-cli.sh -c
[standalone#localhost:9990 /] module add --name=com.oracle --resources=/home/user/Downloads/ojdbc8.jar --dependencies=javax.api,javax.transaction.api
The command is going to be executed without error.
I would expect it to
create the module-subfolders (step 2 in the linked tutorial by Adam Bien)
copy the JAR file to the newly created folder (step 3)
create the module.xml file (step 4)
maybe even to add the necessary <driver /> tag in the standalone.xml (do not know if that should be part of the add module command?) (step 5)
Basically it does a lot of that, but different than I expect.
It creates the subfolder in a wrong(?) location. It is not created in [WILDFLY_HOME]/modules/system/layers/base/com/oracle/main like it is decribed by Adam Bien but it is created [WILDFLY_HOME]/modules/com/oracle/main. The JAR file is correctly copied, the module.xml file is created but the folder seems to be wrong. And the standalone.xml is not altered at all.
If I start the web management console I do not see the driver next to the default H2 one.
So my question is what am I doing wrong with the command so that the folder is created in the correcy localtion? Or does this work as designed and the location is not that relevant and I am making other mistakes that it does not show in management console nor in standalone.xml?
By the way, I also tried to change the command module add --name=system.layers.base.com.oracle .... Now the folder was correct, but in the module.xml the name of the module was also system.layers.base.com.oracle.
I tested with WildFly 26.0.0 and WildFly-preview 26.0.0 under Ubuntu.
It should not be created in modules/system/lasers/base. That is for components provided by the container. Having the module off the root $JBOSS_HOME/modules directory is correct.

AEM Quickstart License Key

I've been given an AEM quickstart jar file and license.properties from a client and I'm trying to set up a local dev environment as described here: https://experienceleague.adobe.com/docs/experience-manager-learn/foundation/development/set-up-a-local-aem-development-environment.html?lang=en#install-apache-maven
But on step 6; opening the jar file. This starts a local server and I get this screen:
What "license key" is this expecting? And where do I find that. Nothing in the license.properties supplied seems to work.
Thanks
Assuming fair use of the license, just put the license.properties next to the JAR, AEM will recognize the license during the start up.
As AEM is a licensed product, YOu would require a license to run the local jar file. You should get the jar file from your:
Company Admin
Adobe partner manager
Send an email to spphelp#adobe.com to obtain one on behalf of your company.
How to use it?
Option 1:
YOu can place the license.properties file next to the aem-quickstart.jar file and when you run the jar file automatically it should take it.
Option 2:
In the case of MAC sometimes the license.properties file does not recognize even if you placed it next to the AEM JAR file.
In that case
copy the license file to a different folder.
delete the license file from the AEM JAR folder
copy below properties from the license file
customer.name >> Customer Name &
downloadId >> license Key
Refer to https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/aem-license-and-installation/td-p/397135 for Adobe communities answer.

Original click once update folder location

I have taken over a click once project from a prior developer. How do I find out where his click once update folder was? The properties of the deployed apps only show where the appdata folder is. I need to know the original update location on the click once server so I can redeploy there, but the location that is stored in the project properties is wrong (as are all of the application configuration values) so I must have an old set of source code.
It's a bit of a shot in the dark, but if you have access to a machine that already has the application installed on it and if the application was configured to check for updates before running, you may be able to see the updates location within the app's CDF-MS file installed on that PC. The CDF-MS file is a binary file but you should be able to use STRINGS.exe or visually inspect it to find the beforeApplicationStartup or deploymentProvider value inside the file.
The file is likely located in C:\Users\USERNAME\AppData\Local\Apps\2.0\RANDOM.STR\RANDOM.STR\manifests

IBM Liberty issue

An architect is having issues bringing Liberty up. Currently, an individual is running a server on his local computer and they want to move it to a shared server. When he tries to deploy a simple “helloworld” it’s failing and he is receiving an error “Context Root Not Found”. He is not sure what to set in server.xml file to have wlp recognize the application. They have ODM 8.5 on the mainframe. He thinks it might help if he saw an example of an EAR or WAR file deployed. Any ideas or suggestions?
Either put your application in the dropins folder, it will be detected and started automatically, or put it in the apps folder and configure in server.xml like this:
<webApplication id="HelloApp" location="HelloApp.war" name="HelloApp"/>
by default context root is application file name without extension, but you can change it by adding contextRoot="mycontext" attribute.

Unlist a subdomain or directory according to robotstxt.org

According to robotstxt.org
The first answer is a workaround: You could put all the files you
don't want robots to visit in a separate sub directory, make that
directory un-listable on the web (by configuring your server)
How do I configure my server to have an unlisted directory or subdomain?
It depends on the server and its configuration.
As it may be a privacy/security issue to list the content of a folder, most servers will probably not do it by default. Some servers might display folder content only if there is no index.html file.
For Apache, see mod_autoindex.
You can easily test it if your server lists content or not:
create a folder test
add a dummy.txt file
visit the URL of this folder, e.g. http://example.com/test/
If you get an error message, your server doesn’t list content. If you see a link list containing dummy.txt, your server does list content.