Artifactory. How to disable access via native browser - artifactory

I use Artifactory аs a private repository. I take link on my repository to use it to gradle. However, if you enter this link in the browser, you will be able to download the jar file from the browser. How can I disable this functionality?

Artifactory does not have built in functionality for disabling the Web UI.
Depending on your use case you can block access to the UI by limiting access to the Web UI using an HTTP proxy in front of Artifactory (or an organizational proxy, firewall etc).
For example, you can limit the access to the web UI only to certain IP address or address ranges.
If you want to completely block web browsers from accessing Artifactory you can configure the reverse proxy to block certain user agents.

CloudRepo provides private and public repositories, if you'd like to prevent anyone from using your stuff you can toggle that repository to private.

Related

F5 Add apm_do_not_touch to HTML response to the end user

I am supporting ASP.NET application running on 3 web servers and have F5 system as firewall and load balance. Actually I don't have experience at all in F5 system but the following issue seems to be related to it
The issue happened after we applied F5 load balancing. Simply it cause JavaScript in the web page to fail sometimes. After refresh the web page it will work fine
To trace the issue I compared the response that fail and the one that success after refresh. The difference was the failed one contains html tag that is not added by our application apm_do_not_touch with a script tag inside it
It seems that happen when the F5 switch between one server to another one as the issue solved when we redirect all the traffic to only one server
Any advice, what is the possible cause and how we can solve it?
APM is F5's Access Policy Manager module and is used for VPN, Web Portals, and federated authentication. The apm_do_not_touch tag is part of this product and is used when you want to prevent the APM module from rewriting portions of HTML such as external links.
If you're not accessing the application through a web portal, this should not be applied and you'll need to work with whomever setup the access policy to resolve as the APM policy is being applied to your application possibly erroneously.
Here is more information on the apm_do_not_touch tag. Depending on your version, there was a known issue for #cc_on in F5 BIG-IP version 11.1 who's workaround was to prevent the APM module from rewriting that command. The same workaround may pose a solution for you. Either way, there are additional complexities to your client traffic flow that you will need to engage your network team/BIG-IP administrators with to ensure your application and their policies don't clash.
It could be as simple as removing the APM policy from your application's pathway but your admins will be able to identify if it's required for external access or reverse proxy requirements.

Product integrated with CQ5 to check the content standard?

we currently use Active Standard (a website quality testing service that checks pages for spelling, grammar, broken links, poor HTML code, etc). I want to understand how they could use this going forward with our new CQ5 site so that content is checked before it goes live. Since Active Standards is a ‘service’ it currently only checks the live site as that is all it can access.
Do we know if there is a content quality testing tool that could integrate into the CQ5 authoring environment?
Challenges:
How would a service like Active Standards be able to access the
authoring environment which sits behind a firewall on client's
network?
Is there a product which integrates with CQ5 that can be run at the
point the author is creating content?
I don't know Active Standard but from your description I understand it's a service that accesses a public website via HTTP to check its content.
If that's correct and there's no way to provide it with credentials so that it could access a secured stating version of your website, the only way that I see is exposing the staging content that you want to check on a public URL like staging.mysite.com, maybe adding disclaimers, robots.txt and removing CSS etc. so that people don't mistake it for the actual site. That staging website can then get content from the CQ author in a restricted way, using CQ access control and read-only users for example. But that won't work if you want to keep your staged content secret.
At the CQ level, the observation/notification and workflow mechanisms can be used to process content as soon as it's created, but to use this you need to be able to submit the content to the checking service yourself using HTTP or other clients, instead of having it crawl your staging content by itself.

How to send data to and from ASP.NET 4.0 website and C# WCF (Web Service)

I am wondering - in my ASP.NET 4.0 website how to connect to the web service I have running?
This is essentially what I would like to accomplish, for testing before I apply it on a larger scale. I want the website to be able to send a value (int) from the website to the getData() method in the web service (auto generated method) and return its result (string) back to the website.
This is my setup for the Website/IIS 7/WCF:
Steps for creating website and service via VS 2010 (.NET 4.0)
Website:
File > New Website
I did not change anything on the default website template
Build > Publish Web Site
Set target location to specific folder
Other settings unchanged
IIS Settings:
Connections - Right Click > Add Web Site
Specified a site name
Specified physical path
Connect As: Set the username/password
Binding Default (http port 80)
Connections - Right Click on Default Web Site > Manage Web Site > Stop
...So as not to end up with two websites on conflicting port
Edit Permissions > Add user "Everyone"
MyNewSite > Manage Website > Start
...Clicked Browse Web Site > Brows *.80 (http)
And the website ran just fine, I was able to access it locally and through vpn with the IP address.
WCFService:
File > New Project > WCF Service Application
...I did not change any of the default settings in the WCF service
I ran WCF service as Admin, and it loaded the little test app where you can type in a value to the getData() method and it returns "You typed {some_number}".
So as far as I know - everything is working with the website and the wcf service. I tried also right clicking on the website in VS, and Add Service Reference and it was able to detect the WCF service.... however, I dont know that I should need to add a reference but simply connect to the WCF like I do to a database via a connection string of sorts.
To elaborate upon my comment, here's a stripped down example. You can find numerous examples of how to do this with a very simple Google search, by the way.
In order for your web site to call any of the methods, it must have a WCF client proxy. This proxy is used to establish the connection to the service and make calls to the methods the service exposes via the [OperationContract] attribute.
Taking your posted example above, if you created a basic no frills don't touch anything WCF Service Application, and you add a reference to it in your website from within Visual Studio, the WCF client proxy will be generated for you, as well as any necessary configuration file settings (in your Web.config file).
Once you've added the reference, you can then do something like the following in your website:
ServiceClient client = new ServiceClient();
string serviceResponse = client.GetData(5);
client.Close();
This would return "You entered: 5" for serviceResponse.
Alternatively, you could use the svcutil.exe to generate a *.cs file and and a config file. You would add the *.cs file to your website project and the <system.serviceModel> section of the config file to your Web.config, and then could use the above code to call the service.
A third way, and this is the way I prefer because of the nature of our application at work and it gives me more control, is to use ChannelFactory<T>, but I would suggest trying the above two approaches to get familiar with the basics first.
Again, see Accessing Services Using a WCF Client, and if that isn't sufficient do a Google search for more examples.
The key point here is that the client requires a proxy to communicate with the WCF service. How you generate that proxy is up to you and the requirements of your project.

how to use facebook connect in local host

Each developer is running IIS on his own machine. We all sit in separate physical location.
One developer develops the code using: http://localhost:8054/connectToFacebook.aspx
another developer develops the code using: http://localhost:80/virtualDirectory/connectToFacebook.aspx
etc.
I'd like the Facebook Connect authentication to work for all the developers.
Generally, the connect mechanism (login button with ajax dialog) does not work from localhost, as it requires a domain name.
Is it possible to make the Connect mechanism work - when watching the webpage from localhost? (or must I run the webpage be a publicly accessible domain name like dyndns?)
this tutorial shows you how to use the c# sdk w/ localhost. Hope that helps.
the easiest way is to make every dev on the team use the same url.
if u r using fb c# sdk, u can continue to use differnt url by implementing your own IFacebookApplication and depending on the request url change the appid and appsecret.

Best way to create a sandbox area on my asp .net host

I would like to create a sandbox area on my hosting provider that only the client can see. For example the production website would be at www.domain.com. However, would it be possible to create a sandbox version of the website at www.domain.com/sandbox and only provide access to the client?
If so, what is the best method? Do I manually have to create a login page etc in the sandbox folder? Or, can I publish the test website in the sandbox area and restrict access through my hosting provider?
Generally a sandbox/staging/test version of your production site would be a complete duplicate of your production deployment, not just the login page.
You'd have a separate copy of the application and the database, and then serve it via another hostname/IP address or on an entirely different machine.
For instance, you could have www.domain.com and test.domain.com, each with the own isolated version of the software. This way your client can play as much as they want in the sandbox without fear of damaging the production environment.
To restrict access you could use access control lists in IIS to restrict the sandbox to a specific ip address (or range), or enable basic support on it with a username/password required security.

Resources