Search Results

Search found 22139 results on 886 pages for 'security testing'.

Page 58/886 | < Previous Page | 54 55 56 57 58 59 60 61 62 63 64 65  | Next Page >

  • Unit Testing Myths and Practices

    We all understand the value of Unit Testing, but how come so few organisations maintain unit tests for their in-house applications? We can no longer pretend that unit testing is a universal panacea for ensuring less-buggy applications. Instead, we should be prepared to actively justify the use of unit tests, and be more savvy about where in the development cycle the unit test resources should be most effectively used.

    Read the article

  • Oracle Application Testing Suite 12.1 ??????????

    - by user773457
    Oracle Application Testing Suite 12.1 ??????????? http://japanmediacentre.oracle.com/content/detail.aspx?ReleaseID=1692???????????????? ?JD Edwards EnterpriseOne????????????????????????????????????? ?Oracle Application Testing Suite 12.1????????????????????????(IE9?Linux) ??????????????Oracle Enterprise Manager????????Oracle Cloud???????????????? ???????SQL?????????SELECT???????????????????????????? ??????????????????????????????????? ???? ATS-Tech ??????????

    Read the article

  • Get the MakeUseOf eBook Guide to Hacker Proofing Your PC

    - by ETC
    If you’re interested in checking out a solid overview of PC security best practices and tips, our friends over at MakeUseOf.com have released another free book in their computer-oriented eBook series. The fifty-page ebook HackerProof: Your Guide to PC Security covers a variety of topics including types of malware, operating systems and their inherent vulnerabilities, security best practices, tools for protecting your PC, the importance of security prep and backups, and recovering from malware attacks. It’s a nice and compact text, perfect for brushing up on security best practices for your own machine or sending to friends and relatives that could use a little after-school tutoring on keeping their computer secure and out of trouble. The best tip from the book? The overall message to be cautious and be preemptive in your security efforts is a great meta-tip to take away. Up-to-date definition files and a healthy sense of random links and emails attachments goes a long, long way towards staying safe. HackerProof: Your Guide to PC Security [Direct Link via MakeUseOf] Latest Features How-To Geek ETC How to Get Amazing Color from Photos in Photoshop, GIMP, and Paint.NET Learn To Adjust Contrast Like a Pro in Photoshop, GIMP, and Paint.NET Have You Ever Wondered How Your Operating System Got Its Name? Should You Delete Windows 7 Service Pack Backup Files to Save Space? What Can Super Mario Teach Us About Graphics Technology? Windows 7 Service Pack 1 is Released: But Should You Install It? Get the MakeUseOf eBook Guide to Hacker Proofing Your PC Sync Your Windows Computer with Your Ubuntu One Account [Desktop Client] Awesome 10 Meter Curved Touchscreen at the University of Groningen [Video] TV Antenna Helper Makes HDTV Antenna Calibration a Snap Turn a Green Laser into a Microscope Projector [Science] The Open Road Awaits [Wallpaper]

    Read the article

  • Reuse security code between WCF and MVC.NET

    - by mrjoltcola
    First the background: I jumped into MVC.NET from the Java MVC world, so my implementation below is possibly cheating, I don't know. I avoided fooling with a custom membership provider and I just implemented the base code needed to authenticate and load roles in my LogOn action. Typically I just need to check roles programatically, and have no use for all of the other membership features, so I didn't originally think I needed a full Membership provider. I have a successful WCF project with a custom authentication and authorization layer that I did at least write per the proper API. I implemented it with custom IPrincipal, UserNamePasswordValidator and IAuthorizationPolicy classes to load from an Oracle database. In my WCF services, I use declarative security: [PrincipalPermission(SecurityAction.Demand, Role="ADMIN")]. The question (on the ASP.NET/MCV.NET side): All my reading indicates I should implement a custom Membership/Roles provider, and use [Authorize(Roles="ADMIN")] on my controller actions. At this point, I don't have a true Membership provider, but I'm using the same User class that implements the IPrincipal interface that works with the WCF security. I plan to share common code between the WCF and ASP.NET modules. So my LogOn action is not using the FormsService (and I assume this is bad). I had commented it out, and just used my "UserService" to access the Oracle db. Note my "TODO" comment below. public ActionResult LogOn(LogOnModel model, string returnUrl) { log.Info("Login attempt by " + model.UserName); if (ModelState.IsValid) { User user = userService.findByUserName(model.UserName); // Commented original MemberShipService code, this is probably bad // if (MembershipService.ValidateUser(model.UserName, model.Password)) if (user != null && user.Authenticate(model.Password) == true) { log.Info("Login success by " + model.UserName); FormsService.SignIn(model.UserName, model.RememberMe); // TODO: Override with Custom identity / roles? user.AddRoles(userService.listRolesByUser(user)); // pull in roles from db if (!String.IsNullOrEmpty(returnUrl)) return Redirect(returnUrl); else return RedirectToAction("Index", "Home"); } else { log.Info("Login failure by " + model.UserName); ModelState.AddModelError("", "The user name or password provided is incorrect."); } } // If we got this far, something failed, redisplay form return View(model); } So can I make the above work? Can I stick the IPrincipal (User) into the CurrentContext or HttpContext? Can I integrate the custom IPrincipal I've already created without writing a full Membership/Roles Provider? I currently stick the User object into the session and access it from all MVC.NET controllers with "CurrentUser" property which grabs it from the session on demand. But this doesn't work with the [Authorize] attribute; I assume that is because it knows nothing about my custom Principal in the session, and is instead using whatever FormsService.SignIn() produces. I also found that session timeouts screw up the login redirect, the user doesn't get forwarded, instead we get a null exception accessing User from the session, and I assume it is related to my "skipping steps" to get a quick implementation. Thanks.

    Read the article

  • Unit test complex classes with many private methods

    - by Simon G
    Hi, I've got a class with one public method and many private methods which are run depending on what parameter are passed to the public method so my code looks something like: public class SomeComplexClass { IRepository _repository; public SomeComplexClass() this(new Repository()) { } public SomeComplexClass(IRepository repository) { _repository = repository; } public List<int> SomeComplexCalcualation(int option) { var list = new List<int>(); if (option == 1) list = CalculateOptionOne(); else if (option == 2) list = CalculateOptionTwo(); else if (option == 3) list = CalculateOptionThree(); else if (option == 4) list = CalculateOptionFour(); else if (option == 5) list = CalculateOptionFive(); return list; } private List<int> CalculateOptionOne() { // Some calculation } private List<int> CalculateOptionTwo() { // Some calculation } private List<int> CalculateOptionThree() { // Some calculation } private List<int> CalculateOptionFour() { // Some calculation } private List<int> CalculateOptionFive() { // Some calculation } } I've thought of a few ways to test this class but all of them seem overly complex or expose the methods more than I would like. The options so far are: Set all the private methods to internal and use [assembly: InternalsVisibleTo()] Separate out all the private methods into a separate class and create an interface. Make all the methods virtual and in my tests create a new class that inherits from this class and override the methods. Are there any other options for testing the above class that would be better that what I've listed? If you would pick one of the ones I've listed can you explain why? Thanks

    Read the article

  • Writing good tests for Django applications

    - by Ludwik Trammer
    I've never written any tests in my life, but I'd like to start writing tests for my Django projects. I've read some articles about tests and decided to try to write some tests for an extremely simple Django app or a start. The app has two views (a list view, and a detail view) and a model with four fields: class News(models.Model): title = models.CharField(max_length=250) content = models.TextField() pub_date = models.DateTimeField(default=datetime.datetime.now) slug = models.SlugField(unique=True) I would like to show you my tests.py file and ask: Does it make sense? Am I even testing for the right things? Are there best practices I'm not following, and you could point me to? my tests.py (it contains 11 tests): # -*- coding: utf-8 -*- from django.test import TestCase from django.test.client import Client from django.core.urlresolvers import reverse import datetime from someproject.myapp.models import News class viewTest(TestCase): def setUp(self): self.test_title = u'Test title: bareksc' self.test_content = u'This is a content 156' self.test_slug = u'test-title-bareksc' self.test_pub_date = datetime.datetime.today() self.test_item = News.objects.create( title=self.test_title, content=self.test_content, slug=self.test_slug, pub_date=self.test_pub_date, ) client = Client() self.response_detail = client.get(self.test_item.get_absolute_url()) self.response_index = client.get(reverse('the-list-view')) def test_detail_status_code(self): """ HTTP status code for the detail view """ self.failUnlessEqual(self.response_detail.status_code, 200) def test_list_status_code(self): """ HTTP status code for the list view """ self.failUnlessEqual(self.response_index.status_code, 200) def test_list_numer_of_items(self): self.failUnlessEqual(len(self.response_index.context['object_list']), 1) def test_detail_title(self): self.failUnlessEqual(self.response_detail.context['object'].title, self.test_title) def test_list_title(self): self.failUnlessEqual(self.response_index.context['object_list'][0].title, self.test_title) def test_detail_content(self): self.failUnlessEqual(self.response_detail.context['object'].content, self.test_content) def test_list_content(self): self.failUnlessEqual(self.response_index.context['object_list'][0].content, self.test_content) def test_detail_slug(self): self.failUnlessEqual(self.response_detail.context['object'].slug, self.test_slug) def test_list_slug(self): self.failUnlessEqual(self.response_index.context['object_list'][0].slug, self.test_slug) def test_detail_template(self): self.assertContains(self.response_detail, self.test_title) self.assertContains(self.response_detail, self.test_content) def test_list_template(self): self.assertContains(self.response_index, self.test_title)

    Read the article

  • How to change the date/time in Python for all modules?

    - by Felix Schwarz
    When I write with business logic, my code often depends on the current time. For example the algorithm which looks at each unfinished order and checks if an invoice should be sent (which depends on the no of days since the job was ended). In these cases creating an invoice is not triggered by an explicit user action but by a background job. Now this creates a problem for me when it comes to testing: I can test invoice creation itself easily However it is hard to create an order in a test and check that the background job identifies the correct orders at the correct time. So far I found two solutions: In the test setup, calculate the job dates relative to the current date. Downside: The code becomes quite complicated as there are no explicit dates written anymore. Sometimes the business logic is pretty complex for edge cases so it becomes hard to debug due to all these relative dates. I have my own date/time accessor functions which I use throughout my code. In the test I just set a current date and all modules get this date. So I can simulate an order creation in February and check that the invoice is created in April easily. Downside: 3rd party modules do not use this mechanism so it's really hard to integrate+test these. The second approach was way more successful to me after all. Therefore I'm looking for a way to set the time Python's datetime+time modules return. Setting the date is usually enough, I don't need to set the current hour or second (even though this would be nice). Is there such a utility? Is there an (internal) Python API that I can use?

    Read the article

  • What's the use of writing tests matching configuration-like code line by line?

    - by Pascal Van Hecke
    Hi, I have been wondering about the usefulness of writing tests that match code one-by-one. Just an example: in Rails, you can define 7 restful routes in one line in routes.rb using: resources :products BDD/TDD proscribes you test first and then write code. In order to test the full effect of this line, devs come up with macros e.g. for shoulda: http://kconrails.com/2010/01/27/route-testing-with-shoulda-in-ruby-on-rails/ class RoutingTest < ActionController::TestCase # simple should_map_resources :products end I'm not trying to pick on the guy that wrote the macros, this is just an example of a pattern that I see all over Rails. I'm just wondering what the use of it is... in the end you're just duplicating code and the only thing you test is that Rails works. You could as well write a tool that transforms your test macros into actual code... When I ask around, people answer me that: "the tests should document your code, so yes it makes sense to write them, even if it's just one line corresponding to one line" What are your thoughts?

    Read the article

  • How can I split abstract testcases in JUnit?

    - by Willi Schönborn
    I have an abstract testcase "AbstractATest" for an interface "A". It has several test methods (@Test) and one abstract method: protected abstract A unit(); which provides the unit under testing. No i have multiple implementations of "A", e.g. "DefaultA", "ConcurrentA", etc. My problem: The testcase is huge (~1500 loc) and it's growing. So i wanted to split it into multiple testcases. How can organize/structure this in Junit 4 without the need to have a concrete testcase for every implementation and abstract testcase. I want e.g. "AInitializeTest", "AExectueTest" and "AStopTest". Each being abstract and containing multiple tests. But for my concrete "ConcurrentA", i only want to have one concrete testcase "ConcurrentATest". I hope my "problem" is clear. EDIT Looks like my description was not that clear. Is it possible to pass a reference to a test? I know parameterized tests, but these require static methods, which is not applicable to my setup. Subclasses of an abstract testcase decide about the parameter.

    Read the article

  • 'sudo apt-get update' error

    - by psilo
    I've been having an issue with 'sudo apt-get update' for several days now. I've tried every proposed solution I could find but to no avail. Here is the output to 'apt-get update'. Ign http://us.archive.ubuntu.com precise InRelease Ign http://us.archive.ubuntu.com precise-updates InRelease Ign http://us.archive.ubuntu.com precise-backports InRelease Ign http://us.archive.ubuntu.com precise-security InRelease Ign http://archive.ubuntu.com precise InRelease Err http://us.archive.ubuntu.com precise Release.gpg Unable to connect to 69.163.233.85:80: Err http://us.archive.ubuntu.com precise-updates Release.gpg Unable to connect to 69.163.233.85:80: Err http://us.archive.ubuntu.com precise-backports Release.gpg Unable to connect to 69.163.233.85:80: Err http://archive.ubuntu.com precise Release.gpg Unable to connect to 69.163.233.85:80: Err http://us.archive.ubuntu.com precise-security Release.gpg Unable to connect to 69.163.233.85:80: Ign http://us.archive.ubuntu.com precise Release Ign http://us.archive.ubuntu.com precise-updates Release Ign http://archive.ubuntu.com precise Release Ign http://us.archive.ubuntu.com precise-backports Release Ign http://us.archive.ubuntu.com precise-security Release Ign http://us.archive.ubuntu.com precise/main TranslationIndex Ign http://us.archive.ubuntu.com precise/multiverse TranslationIndex Ign http://us.archive.ubuntu.com precise/restricted TranslationIndex Ign http://us.archive.ubuntu.com precise/universe TranslationIndex Ign http://archive.ubuntu.com precise/main TranslationIndex Ign http://us.archive.ubuntu.com precise-updates/main TranslationIndex Ign http://us.archive.ubuntu.com precise-updates/multiverse TranslationIndex Ign http://us.archive.ubuntu.com precise-updates/restricted TranslationIndex Ign http://us.archive.ubuntu.com precise-updates/universe TranslationIndex Ign http://us.archive.ubuntu.com precise-backports/main TranslationIndex Ign http://us.archive.ubuntu.com precise-backports/multiverse TranslationIndex Ign http://us.archive.ubuntu.com precise-backports/restricted TranslationIndex Ign http://us.archive.ubuntu.com precise-backports/universe TranslationIndex Ign http://us.archive.ubuntu.com precise-security/main TranslationIndex Ign http://us.archive.ubuntu.com precise-security/multiverse TranslationIndex Ign http://us.archive.ubuntu.com precise-security/restricted TranslationIndex Ign http://us.archive.ubuntu.com precise-security/universe TranslationIndex Err http://archive.ubuntu.com precise/main Sources Unable to connect to 69.163.233.85:80: Err http://archive.ubuntu.com precise/main i386 Packages Unable to connect to 69.163.233.85:80: Err http://archive.ubuntu.com precise/main Translation-en_US Unable to connect to 69.163.233.85:80: Err http://archive.ubuntu.com precise/main Translation-en Unable to connect to 69.163.233.85:80: Err http://us.archive.ubuntu.com precise/main Sources Unable to connect to 69.163.233.85:80: Err http://us.archive.ubuntu.com precise/restricted Sources Unable to connect to 69.163.233.85:80: Err http://us.archive.ubuntu.com precise/universe Sources Unable to connect to 69.163.233.85:80: Err http://us.archive.ubuntu.com precise/multiverse Sources Unable to connect to 69.163.233.85:80: Err http://us.archive.ubuntu.com precise/main i386 Packages Unable to connect to 69.163.233.85:80: Err http://us.archive.ubuntu.com precise/restricted i386 Packages Unable to connect to 69.163.233.85:80: Err http://us.archive.ubuntu.com precise/universe i386 Packages Unable to connect to 69.163.233.85:80: Err http://us.archive.ubuntu.com precise/multiverse i386 Packages Unable to connect to 69.163.233.85:80: Err http://us.archive.ubuntu.com precise-updates/main Sources Unable to connect to 69.163.233.85:80: Err http://us.archive.ubuntu.com precise-updates/restricted Sources Unable to connect to 69.163.233.85:80: Err http://us.archive.ubuntu.com precise-updates/universe Sources Unable to connect to 69.163.233.85:80: Err http://us.archive.ubuntu.com precise-updates/multiverse Sources Unable to connect to 69.163.233.85:80: Err http://us.archive.ubuntu.com precise-updates/main i386 Packages Unable to connect to 69.163.233.85:80: Err http://us.archive.ubuntu.com precise-updates/restricted i386 Packages Unable to connect to 69.163.233.85:80: Err http://us.archive.ubuntu.com precise-updates/universe i386 Packages Unable to connect to 69.163.233.85:80: Err http://us.archive.ubuntu.com precise-updates/multiverse i386 Packages Unable to connect to 69.163.233.85:80: Err http://us.archive.ubuntu.com precise-backports/main Sources Unable to connect to 69.163.233.85:80: Err http://us.archive.ubuntu.com precise-backports/restricted Sources Unable to connect to 69.163.233.85:80: Err http://us.archive.ubuntu.com precise-backports/universe Sources Unable to connect to 69.163.233.85:80: Err http://us.archive.ubuntu.com precise-backports/multiverse Sources Unable to connect to 69.163.233.85:80: Err http://us.archive.ubuntu.com precise-backports/main i386 Packages Unable to connect to 69.163.233.85:80: Err http://us.archive.ubuntu.com precise-backports/restricted i386 Packages Unable to connect to 69.163.233.85:80: Err http://us.archive.ubuntu.com precise-backports/universe i386 Packages Unable to connect to 69.163.233.85:80: Err http://us.archive.ubuntu.com precise-backports/multiverse i386 Packages Unable to connect to 69.163.233.85:80: Err http://us.archive.ubuntu.com precise-security/main Sources Unable to connect to 69.163.233.85:80: Err http://us.archive.ubuntu.com precise-security/restricted Sources Unable to connect to 69.163.233.85:80: Err http://us.archive.ubuntu.com precise-security/universe Sources Unable to connect to 69.163.233.85:80: Err http://us.archive.ubuntu.com precise-security/multiverse Sources Unable to connect to 69.163.233.85:80: Err http://us.archive.ubuntu.com precise-security/main i386 Packages Unable to connect to 69.163.233.85:80: Err http://us.archive.ubuntu.com precise-security/restricted i386 Packages Unable to connect to 69.163.233.85:80: Err http://us.archive.ubuntu.com precise-security/universe i386 Packages Unable to connect to 69.163.233.85:80: Err http://us.archive.ubuntu.com precise-security/multiverse i386 Packages Unable to connect to 69.163.233.85:80: Err http://us.archive.ubuntu.com precise/main Translation-en_US Unable to connect to 69.163.233.85:80: Err http://us.archive.ubuntu.com precise/main Translation-en Unable to connect to 69.163.233.85:80: Err http://us.archive.ubuntu.com precise/multiverse Translation-en_US Unable to connect to 69.163.233.85:80: Err http://us.archive.ubuntu.com precise/multiverse Translation-en Unable to connect to 69.163.233.85:80: Err http://us.archive.ubuntu.com precise/restricted Translation-en_US Unable to connect to 69.163.233.85:80: Err http://us.archive.ubuntu.com precise/restricted Translation-en Unable to connect to 69.163.233.85:80: Err http://us.archive.ubuntu.com precise/universe Translation-en_US Unable to connect to 69.163.233.85:80: Err http://us.archive.ubuntu.com precise/universe Translation-en Unable to connect to 69.163.233.85:80: Err http://us.archive.ubuntu.com precise-updates/main Translation-en_US Unable to connect to 69.163.233.85:80: Err http://us.archive.ubuntu.com precise-updates/main Translation-en Unable to connect to 69.163.233.85:80: Err http://us.archive.ubuntu.com precise-updates/multiverse Translation-en_US Unable to connect to 69.163.233.85:80: Err http://us.archive.ubuntu.com precise-updates/multiverse Translation-en Unable to connect to 69.163.233.85:80: Err http://us.archive.ubuntu.com precise-updates/restricted Translation-en_US Unable to connect to 69.163.233.85:80: Err http://us.archive.ubuntu.com precise-updates/restricted Translation-en Unable to connect to 69.163.233.85:80: Err http://us.archive.ubuntu.com precise-updates/universe Translation-en_US Unable to connect to 69.163.233.85:80: Err http://us.archive.ubuntu.com precise-updates/universe Translation-en Unable to connect to 69.163.233.85:80: Err http://us.archive.ubuntu.com precise-backports/main Translation-en_US Unable to connect to 69.163.233.85:80: Err http://us.archive.ubuntu.com precise-backports/main Translation-en Unable to connect to 69.163.233.85:80: Err http://us.archive.ubuntu.com precise-backports/multiverse Translation-en_US Unable to connect to 69.163.233.85:80: Err http://us.archive.ubuntu.com precise-backports/multiverse Translation-en Unable to connect to 69.163.233.85:80: Err http://us.archive.ubuntu.com precise-backports/restricted Translation-en_US Unable to connect to 69.163.233.85:80: Err http://us.archive.ubuntu.com precise-backports/restricted Translation-en Unable to connect to 69.163.233.85:80: Err http://us.archive.ubuntu.com precise-backports/universe Translation-en_US Unable to connect to 69.163.233.85:80: Err http://us.archive.ubuntu.com precise-backports/universe Translation-en Unable to connect to 69.163.233.85:80: Err http://us.archive.ubuntu.com precise-security/main Translation-en_US Unable to connect to 69.163.233.85:80: Err http://us.archive.ubuntu.com precise-security/main Translation-en Unable to connect to 69.163.233.85:80: Err http://us.archive.ubuntu.com precise-security/multiverse Translation-en_US Unable to connect to 69.163.233.85:80: Err http://us.archive.ubuntu.com precise-security/multiverse Translation-en Unable to connect to 69.163.233.85:80: Err http://us.archive.ubuntu.com precise-security/restricted Translation-en_US Unable to connect to 69.163.233.85:80: Err http://us.archive.ubuntu.com precise-security/restricted Translation-en Unable to connect to 69.163.233.85:80: Err http://us.archive.ubuntu.com precise-security/universe Translation-en_US Unable to connect to 69.163.233.85:80: Err http://us.archive.ubuntu.com precise-security/universe Translation-en Unable to connect to 69.163.233.85:80: W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/precise/Release.gpg Unable to connect to 69.163.233.85:80: W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/precise-updates/Release.gpg Unable to connect to 69.163.233.85:80: W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/precise-backports/Release.gpg Unable to connect to 69.163.233.85:80: W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/precise-security/Release.gpg Unable to connect to 69.163.233.85:80: W: Failed to fetch http://archive.ubuntu.com/dists/precise/Release.gpg Unable to connect to 69.163.233.85:80: W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/precise/main/source/Sources Unable to connect to 69.163.233.85:80: W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/precise/restricted/source/Sources Unable to connect to 69.163.233.85:80: W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/precise/universe/source/Sources Unable to connect to 69.163.233.85:80: W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/precise/multiverse/source/Sources Unable to connect to 69.163.233.85:80: W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/precise/main/binary-i386/Packages Unable to connect to 69.163.233.85:80: W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/precise/restricted/binary-i386/Packages Unable to connect to 69.163.233.85:80: W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/precise/universe/binary-i386/Packages Unable to connect to 69.163.233.85:80: W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/precise/multiverse/binary-i386/Packages Unable to connect to 69.163.233.85:80: W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/precise-updates/main/source/Sources Unable to connect to 69.163.233.85:80: W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/precise-updates/restricted/source/Sources Unable to connect to 69.163.233.85:80: W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/precise-updates/universe/source/Sources Unable to connect to 69.163.233.85:80: W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/precise-updates/multiverse/source/Sources Unable to connect to 69.163.233.85:80: W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/precise-updates/main/binary-i386/Packages Unable to connect to 69.163.233.85:80: W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/precise-updates/restricted/binary-i386/Packages Unable to connect to 69.163.233.85:80: W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/precise-updates/universe/binary-i386/Packages Unable to connect to 69.163.233.85:80: W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/precise-updates/multiverse/binary-i386/Packages Unable to connect to 69.163.233.85:80: W: Failed to fetch http://archive.ubuntu.com/dists/precise/main/source/Sources Unable to connect to 69.163.233.85:80: W: Failed to fetch http://archive.ubuntu.com/dists/precise/main/binary-i386/Packages Unable to connect to 69.163.233.85:80: W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/precise-backports/main/source/Sources Unable to connect to 69.163.233.85:80: W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/precise-backports/restricted/source/Sources Unable to connect to 69.163.233.85:80: W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/precise-backports/universe/source/Sources Unable to connect to 69.163.233.85:80: W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/precise-backports/multiverse/source/Sources Unable to connect to 69.163.233.85:80: W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/precise-backports/main/binary-i386/Packages Unable to connect to 69.163.233.85:80: W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/precise-backports/restricted/binary-i386/Packages Unable to connect to 69.163.233.85:80: W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/precise-backports/universe/binary-i386/Packages Unable to connect to 69.163.233.85:80: W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/precise-backports/multiverse/binary-i386/Packages Unable to connect to 69.163.233.85:80: W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/precise-security/main/source/Sources Unable to connect to 69.163.233.85:80: W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/precise-security/restricted/source/Sources Unable to connect to 69.163.233.85:80: W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/precise-security/universe/source/Sources Unable to connect to 69.163.233.85:80: W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/precise-security/multiverse/source/Sources Unable to connect to 69.163.233.85:80: W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/precise-security/main/binary-i386/Packages Unable to connect to 69.163.233.85:80: W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/precise-security/restricted/binary-i386/Packages Unable to connect to 69.163.233.85:80: W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/precise-security/universe/binary-i386/Packages Unable to connect to 69.163.233.85:80: W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/precise-security/multiverse/binary-i386/Packages Unable to connect to 69.163.233.85:80: W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/precise/main/i18n/Translation-en_US Unable to connect to 69.163.233.85:80: W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/precise/main/i18n/Translation-en Unable to connect to 69.163.233.85:80: W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/precise/multiverse/i18n/Translation-en_US Unable to connect to 69.163.233.85:80: W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/precise/multiverse/i18n/Translation-en Unable to connect to 69.163.233.85:80: W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/precise/restricted/i18n/Translation-en_US Unable to connect to 69.163.233.85:80: W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/precise/restricted/i18n/Translation-en Unable to connect to 69.163.233.85:80: W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/precise/universe/i18n/Translation-en_US Unable to connect to 69.163.233.85:80: W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/precise/universe/i18n/Translation-en Unable to connect to 69.163.233.85:80: W: Failed to fetch http://archive.ubuntu.com/dists/precise/main/i18n/Translation-en_US Unable to connect to 69.163.233.85:80: W: Failed to fetch http://archive.ubuntu.com/dists/precise/main/i18n/Translation-en Unable to connect to 69.163.233.85:80: W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/precise-updates/main/i18n/Translation-en_US Unable to connect to 69.163.233.85:80: W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/precise-updates/main/i18n/Translation-en Unable to connect to 69.163.233.85:80: W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/precise-updates/multiverse/i18n/Translation-en_US Unable to connect to 69.163.233.85:80: W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/precise-updates/multiverse/i18n/Translation-en Unable to connect to 69.163.233.85:80: W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/precise-updates/restricted/i18n/Translation-en_US Unable to connect to 69.163.233.85:80: W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/precise-updates/restricted/i18n/Translation-en Unable to connect to 69.163.233.85:80: W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/precise-updates/universe/i18n/Translation-en_US Unable to connect to 69.163.233.85:80: W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/precise-updates/universe/i18n/Translation-en Unable to connect to 69.163.233.85:80: W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/precise-backports/main/i18n/Translation-en_US Unable to connect to 69.163.233.85:80: W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/precise-backports/main/i18n/Translation-en Unable to connect to 69.163.233.85:80: W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/precise-backports/multiverse/i18n/Translation-en_US Unable to connect to 69.163.233.85:80: W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/precise-backports/multiverse/i18n/Translation-en Unable to connect to 69.163.233.85:80: W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/precise-backports/restricted/i18n/Translation-en_US Unable to connect to 69.163.233.85:80: W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/precise-backports/restricted/i18n/Translation-en Unable to connect to 69.163.233.85:80: W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/precise-backports/universe/i18n/Translation-en_US Unable to connect to 69.163.233.85:80: W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/precise-backports/universe/i18n/Translation-en Unable to connect to 69.163.233.85:80: W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/precise-security/main/i18n/Translation-en_US Unable to connect to 69.163.233.85:80: W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/precise-security/main/i18n/Translation-en Unable to connect to 69.163.233.85:80: W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/precise-security/multiverse/i18n/Translation-en_US Unable to connect to 69.163.233.85:80: W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/precise-security/multiverse/i18n/Translation-en Unable to connect to 69.163.233.85:80: W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/precise-security/restricted/i18n/Translation-en_US Unable to connect to 69.163.233.85:80: W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/precise-security/restricted/i18n/Translation-en Unable to connect to 69.163.233.85:80: W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/precise-security/universe/i18n/Translation-en_US Unable to connect to 69.163.233.85:80: W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/precise-security/universe/i18n/Translation-en Unable to connect to 69.163.233.85:80: E: Some index files failed to download. They have been ignored, or old ones used instead.

    Read the article

  • Visual Studio Load Testing using Windows Azure

    - by Tarun Arora
    In my opinion the biggest adoption barrier in performance testing on smaller projects is not the tooling but the high infrastructure and administration cost that comes with this phase of testing. Only if a reusable solution was possible and infrastructure management wasn’t as expensive, adoption would certainly spike. It certainly is possible if you bring Visual Studio and Windows Azure into the equation. It is possible to run your test rig in the cloud without getting tangled in SCVMM or Lab Management. All you need is an active Azure subscription, Windows Azure endpoint enabled developer workstation running visual studio ultimate on premise, windows azure endpoint enabled worker roles on azure compute instances set up to run as test controllers and test agents. My test rig is running SQL server 2012 and Visual Studio 2012 RC agents. The beauty is that the solution is reusable, you can open the azure project, change the subscription and certificate, click publish and *BOOM* in less than 15 minutes you could have your own test rig running in the cloud. In this blog post I intend to show you how you can use the power of Windows Azure to effectively abstract the administration cost of infrastructure management and lower the total cost of Load & Performance Testing. As a bonus, I will share a reusable solution that you can use to automate test rig creation for both VS 2010 agents as well as VS 2012 agents. Introduction The slide show below should help you under the high level details of what we are trying to achive... Leveraging Azure for Performance Testing View more PowerPoint from Avanade Scenario 1 – Running a Test Rig in Windows Azure To start off with the basics, in the first scenario I plan to discuss how to, - Automate deployment & configuration of Windows Azure Worker Roles for Test Controller and Test Agent - Automate deployment & configuration of SQL database on Test Controller on the Test Controller Worker Role - Scaling Test Agents on demand - Creating a Web Performance Test and a simple Load Test - Managing Test Controllers right from Visual Studio on Premise Developer Workstation - Viewing results of the Load Test - Cleaning up - Have the above work in the shape of a reusable solution for both VS2010 and VS2012 Test Rig Scenario 2 – The scaled out Test Rig and sharing data using SQL Azure A scaled out version of this implementation would involve running multiple test rigs running in the cloud, in this scenario I will show you how to sync the load test database from these distributed test rigs into one SQL Azure database using Azure sync. The selling point for this scenario is being able to collate the load test efforts from across the organization into one data store. - Deploy multiple test rigs using the reusable solution from scenario 1 - Set up and configure Windows Azure Sync - Test SQL Azure Load Test result database created as a result of Windows Azure Sync - Cleaning up - Have the above work in the shape of a reusable solution for both VS2010 and VS2012 Test Rig The Ingredients Though with an active MSDN ultimate subscription you would already have access to everything and more, you will essentially need the below to try out the scenarios, 1. Windows Azure Subscription 2. Windows Azure Storage – Blob Storage 3. Windows Azure Compute – Worker Role 4. SQL Azure Database 5. SQL Data Sync 6. Windows Azure Connect – End points 7. SQL 2012 Express or SQL 2008 R2 Express 8. Visual Studio All Agents 2012 or Visual Studio All Agents 2010 9. A developer workstation set up with Visual Studio 2012 – Ultimate or Visual Studio 2010 – Ultimate 10. Visual Studio Load Test Unlimited Virtual User Pack. Walkthrough To set up the test rig in the cloud, the test controller, test agent and SQL express installers need to be available when the worker role set up starts, the easiest and most efficient way is to pre upload the required software into Windows Azure Blob storage. SQL express, test controller and test agent expose various switches which we can take advantage of including the quiet install switch. Once all the 3 have been installed the test controller needs to be registered with the test agents and the SQL database needs to be associated to the test controller. By enabling Windows Azure connect on the machines in the cloud and the developer workstation on premise we successfully create a virtual network amongst the machines enabling 2 way communication. All of the above can be done programmatically, let’s see step by step how… Scenario 1 Video Walkthrough–Leveraging Windows Azure for performance Testing Scenario 2 Work in progress, watch this space for more… Solution If you are still reading and are interested in the solution, drop me an email with your windows live id. I’ll add you to my TFS preview project which has a re-usable solution for both VS 2010 and VS 2012 test rigs as well as guidance and demo performance tests.   Conclusion Other posts and resources available here. Possibilities…. Endless!

    Read the article

  • Basic WCF Unit Testing

    - by Brian
    Coming from someone who loves the KISS method, I was surprised to find that I was making something entirely too complicated. I know, shocker right? Now I'm no unit testing ninja, and not really a WCF ninja either, but had a desire to test service calls without a) going to a database, or b) making sure that the entire WCF infrastructure was tip top. Who does? It's not the environment I want to test, just the logic I’ve written to ensure there aren't any side effects. So, for the K.I.S.S. method: Assuming that you're using a WCF service library (you are using service libraries correct?), it's really as easy as referencing the service library, then building out some stubs for bunking up data. The service contract We’ll use a very basic service contract, just for getting and updating an entity. I’ve used the default “CompositeType” that is in the template, handy only for examples like this. I’ve added an Id property and overridden ToString and Equals. [ServiceContract] public interface IMyService { [OperationContract] CompositeType GetCompositeType(int id); [OperationContract] CompositeType SaveCompositeType(CompositeType item); [OperationContract] CompositeTypeCollection GetAllCompositeTypes(); } The implementation When I implement the service, I want to be able to send known data into it so I don’t have to fuss around with database access or the like. To do this, I first have to create an interface for my data access: public interface IMyServiceDataManager { CompositeType GetCompositeType(int id); CompositeType SaveCompositeType(CompositeType item); CompositeTypeCollection GetAllCompositeTypes(); } For the purposes of this we can ignore our implementation of the IMyServiceDataManager interface inside of the service. Pretend it uses LINQ to Entities to map its data, or maybe it goes old school and uses EntLib to talk to SQL. Maybe it talks to a tape spool on a mainframe on the third floor. It really doesn’t matter. That’s the point. So here’s what our service looks like in its most basic form: public CompositeType GetCompositeType(int id) { //sanity checks if (id == 0) throw new ArgumentException("id cannot be zero."); return _dataManager.GetCompositeType(id); } public CompositeType SaveCompositeType(CompositeType item) { return _dataManager.SaveCompositeType(item); } public CompositeTypeCollection GetAllCompositeTypes() { return _dataManager.GetAllCompositeTypes(); } But what about the datamanager? The constructor takes care of that. I don’t want to expose any testing ability in release (or the ability for someone to swap out my datamanager) so this is what we get: IMyServiceDataManager _dataManager; public MyService() { _dataManager = new MyServiceDataManager(); } #if DEBUG public MyService(IMyServiceDataManager dataManager) { _dataManager = dataManager; } #endif The Stub Now it’s time for the rubber to meet the road… Like most guys that ever talk about unit testing here’s a sample that is painting in *very* broad strokes. The important part however is that within the test project, I’ve created a bunk (unit testing purists would say stub I believe) object that implements my IMyServiceDataManager so that I can deal with known data. Here it is: internal class FakeMyServiceDataManager : IMyServiceDataManager { internal FakeMyServiceDataManager() { Collection = new CompositeTypeCollection(); Collection.AddRange(new CompositeTypeCollection { new CompositeType { Id = 1, BoolValue = true, StringValue = "foo 1", }, new CompositeType { Id = 2, BoolValue = false, StringValue = "foo 2", }, new CompositeType { Id = 3, BoolValue = true, StringValue = "foo 3", }, }); } CompositeTypeCollection Collection { get; set; } #region IMyServiceDataManager Members public CompositeType GetCompositeType(int id) { if (id <= 0) return null; return Collection.SingleOrDefault(m => m.Id == id); } public CompositeType SaveCompositeType(CompositeType item) { var existing = Collection.SingleOrDefault(m => m.Id == item.Id); if (null != existing) { Collection.Remove(existing); } if (item.Id == 0) { item.Id = Collection.Count > 0 ? Collection.Max(m => m.Id) + 1 : 1; } Collection.Add(item); return item; } public CompositeTypeCollection GetAllCompositeTypes() { return Collection; } #endregion } So it’s tough to see in this example why any of this is necessary, but in a real world application you would/should/could be applying much more logic within your service implementation. This all serves to ensure that between refactorings etc, that it doesn’t send sparking cogs all about or let the blue smoke out. Here’s a simple test that brings it all home, remember, broad strokes: [TestMethod] public void MyService_GetCompositeType_ExpectedValues() { FakeMyServiceDataManager fake = new FakeMyServiceDataManager(); MyService service = new MyService(fake); CompositeType expected = fake.GetCompositeType(1); CompositeType actual = service.GetCompositeType(2); Assert.AreEqual<CompositeType>(expected, actual, "Objects are not equal. Expected: {0}; Actual: {1};", expected, actual); } Summary That’s really all there is to it. You could use software x or framework y to do the exact same thing, but in my case I just didn’t really feel like it. This speaks volumes to my not yet ninja unit testing prowess.

    Read the article

  • Facebook Connect - Security Warning

    - by Skoder
    Hey all, I'm using Facebook connect using FBML tags. Although it works, when I run the site in Internet Explorer, a security warning comes up similar to this: The current webpage is trying to open a site in your Trusted sites list. Do you want to allow this? Current site: http://www.facebook.com Trusted site: http://localhost" My Facebook code involves these two: http://static.ak.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php http://static.ak.connect.facebook.com/js/api_lib/v0.4/XdCommReceiver.js I tried changing them to HTTPS: https://ssl.connect... but the errors still appear. None of my pages use SSL. I've also tried turning facebook-logo='false' but still no luck. Any ideas on how to fix this? Although it's not show-stopping, it doesn't give a good impression to users who may be feel it insecure. Thanks

    Read the article

  • Flash CS4 AS3 Security Sandbox Violation

    - by Jennifer Heidelberg
    Hi, I have build my entire website with flash and embedded several swf objects (slideshows) into it. everything always worked fine when I published it as swf movie. but now that I want to upload my website an error message occurs saying: Error #2044: Unhandled SecurityErrorEvent:. text=Error #2140: Security sandbox violation: file:///mylayout.swf cannot load file:///slideshow_1.swf. Local-with-filesystem and local-with-networking SWF files cannot load each other. I know that it has something to do with the fact that one of the swf is local with filesystem and the other local with networking. but in my publish settings i told it to access local files only. but it didnt help. does anyone have an answer?

    Read the article

  • How to tell whether Code Access Security is allowed in library code

    - by Sander Rijken
    In .NET 4 Code Access Security (CAS) is deprecated. Whenever you call a method that implicitly uses it, it fails with a NotSupportedException, that can be resolved with a configuration switch that makes it fall back to the old behavior. We have a common library that's used in both .NET 3.5 and .NET 4, so we need to be able to tell whether or not we should use the CAS method. For example, in .NET 3.5 I should call: Assembly.Load(string, Evidence); Whereas in .NET 4 I want to call Assembly.Load(string); Calling Load(string, Evidence) throws a NotSupportedException. Of course this works, but I'd like to know if there's a better method: try { asm = Assembly.Load(someString, someEvidence); } catch(NotSupportedException) { asm = Assembly.Load(someString); }

    Read the article

  • How to inherit from DataAnnotations.ValidationAttribute (it appears SecureCritical under Visual Stud

    - by codetuner
    Hi, I have an [AllowPartiallyTrustedCallers] class library containing subtypes of the System.DataAnnotations.ValidationAttribute. The library is used on contract types of WCF services. In .NET 2/3.5, this worked fine. Since .NET 4.0 however, running a client of the service in the Visual Studio debugger results in the exception "Inheritance security rules violated by type: '(my subtype of ValidationAttribute)'. Derived types must either match the security accessibility of the base type or be less accessible." (System.TypeLoadException) The error appears to occure only when all of the following conditions are met: a subclass of ValidationAttribute is in an AllowPartiallyTrustedCallers assembly reflection is used to check for the attribute the Visual Studio hosting process is enabled (checkbox on Project properties, Debug tab) So basically, in Visual Studio.NET 2010: create a new Console project, add a reference to "System.ComponentModel.DataAnnotations" 4.0.0.0, write the following code: . using System; [assembly: System.Security.AllowPartiallyTrustedCallers()] namespace TestingVaidationAttributeSecurity { public class MyValidationAttribute : System.ComponentModel.DataAnnotations.ValidationAttribute { } [MyValidation] public class FooBar { } class Program { static void Main(string[] args) { Console.WriteLine("ValidationAttribute IsCritical: {0}", typeof(System.ComponentModel.DataAnnotations.ValidationAttribute).IsSecurityCritical); FooBar fb = new FooBar(); fb.GetType().GetCustomAttributes(true); Console.WriteLine("Press enter to end."); Console.ReadLine(); } } } Press F5 and you get the exception ! Press Ctrl-F5 (start without debugging), and it all works fine without exception... The strange thing is that the ValidationAttribute will or will not be securitycritical depending on the way you run the program (F5 or Ctrl+F5). As illustrated by the Console.WriteLine in the above code. But then again, this appear to happen with other attributes (and types?) too. Now the questions... Why do I have this behaviour when inheriting from ValidationAttribute, but not when inheriting from System.Attribute ? (Using Reflector I don't find special settings on the ValidationAttribute class or it's assembly) And what can I do to solve this ? How can I keep MyValidationAttribute inheriting from ValidationAttribute in an AllowPartiallyTrustedCallers assembly without marking it SecurityCritical, still using the new .NET 4 level 2 security model and still have it work using the VS.NET debug host (or other hosts) ?? Thanks a lot! Rudi

    Read the article

  • Spring-Security with X509?

    - by jschoen
    I am new to spring-security in general and am a bit confused. The project I am trying to integrate this with uses X509 certificates to identify users for signing in to the application. There are no usernames or passwords. We validate the certificates are good, and that they have been given access to our app. The question is how do I integrate spring in to this to get their roles using the X509 certificates? I have seen this: <http> ... <x509 subject-principal-regex="CN=(.*?)," user-service-ref="userService"/> ... </http> But I don't understand how this works. Will it still require something for a password? Or is the subject all it needs?

    Read the article

  • Jersey, Spring, Tomcat and Security Annotations

    - by jr
    I need to secure a simple jersey RESTful API in a Tomcat 6.0.24 container. I'd like to keep the authentication with Basic Authentication using the tomcat-users.xml file to define the users and roles (this is for now, like I said its small). Now, for authorization I'd like to be able to use the JSR 250 annotations like @RolesAllowed, @PermitAll, @DenyAll, etc. I cannot for the life of me figure out how to wire this all up together. I really don't want to go spring-security route, since I need something very simple at the current time. Can someone point me in the right direction.

    Read the article

  • Visual Studio / Visual Source Safe / Integrated Security / IIS 7

    - by Jason
    Using Visual Source Safe with IIS integration (the working dir is the IIS site) Visual Studio, pointed to the IIS site would load up the Web project. It would be under VSS control (have to check out files, etc). Recently, we had to switch to Integrated Security for our database connections from the web app. This means changing the impersonation of the IIS app pool (and anon authentication) to the impersonated account. Since I did this -- my project loads in Visual Studio, but it acts as if I'm not me, and the files aren't under source control anymore. I'm going to assume it's something with the pass-through from IIS to the VSS (as if you'll remember you had to add IIS_USERS to the VSS list of users). Even trying to add the impersonated account didn't work. Any ideas?

    Read the article

  • Spring security custom principal bean

    - by wuntee
    I have a web application that is set up to use the default ldap server/authentication manager/authentication provider/user service. I have another DAO that already does majority of the work that those do (besides the authenticating a user) using Spring-LDAP. My problem is that I want the principal to be of my own custom bean class. What is the simplest way to do this? Initially I was thinking to create a custom authentication provider, but since the default one does exactly what I want, there doesnt seem to be a need. I am thinking I just need to override whatever object actually returns the Principal bean. Is this possible, and able to be injected into the security ldap authenticator context?

    Read the article

  • How to tell wether Code Access Security is allowed in library code

    - by Sander Rijken
    in .NET 4 Code Access Security (CAS) is deprecated. Whenever you call a method that implicitly uses it, it fails with a NotSupportedException, that can be resolved with a configuration switch that makes it fall back to the old behavior. We have a common library that's used in both .NET 3.5 and .NET 4, so we need to be able to tell wether or not we should use the CAS method. For example, in .NET 3.5 I should call: Assembly.Load(string, Evidence); Whereas in .NET 4 I want to call Assembly.Load(string); Calling Load(string, Evidence) throws a NotSupportedException. Ofcourse this works, but I'd like to know if there's a better method: try { asm = Assembly.Load(someString, someEvidence); } catch(NotSupportedException) { asm = Assembly.Load(someString); }

    Read the article

  • security issue of Linux sudo command?

    - by George2
    Hello everyone, 1. I am using Red Hat Enterprise 5 Linux box. I find if a user is in /etc/sudoers file, then if the user run command with sudo, the user will run this command with root privilege (without knowing root password, the user runs sudo only need to input the user's own password in order to run a command with sudo). Is that correct understanding? 2. If yes, then is it a security hole? Since users other than root could run with root privilege? thanks in advance, George

    Read the article

  • Security flaw in this code approach

    - by Alec Smart
    Hello, Am wondering if there would be any security flaw in this approach. I am writing a piece of code which allows users to upload files and another set to download those files. These files can be anything. User uploads the file (any file including .php files), it is renamed to an md5 hash (extension removed) and stored on server. A corresponding mySQL entry is made. The user trying to download the file, uses say download.php to download the file where the md5 file is sent (with the original name). Is there someway in which anyone can exploit the above scenario?

    Read the article

  • Spring security accessing principal

    - by wuntee
    When using spring security, specifically with @notation; what is the proper way to access the principal in a Controller? Lets say the following is my controller, but I would like to access the principal in the secure() method somewhere... @Controller public class LoginController { @RequestMapping(value = "/login", method = RequestMethod.GET) public String login(ModelMap map, @RequestParam(value="fail" , required=false) String fail){ map.addAttribute("title", "Login: AD Credentials"); if(fail != null){ map.addAttribute("error", "Invalid credentials"); } return("login"); } @RequestMapping("/secure") @PreAuthorize("isAuthenticated()") public String secure(ModelMap map, String principal){ System.out.println(principal); return("secure"); } }

    Read the article

  • Image Uploading - security issues

    - by TenaciousImpy
    Hi, I'm developing an ASP.NET Web app and would like the user to be able to either upload an image from their local system, or pass in a URL to an image. The image can either be a JPG or PNG. What security issues should I be concerned about doing this? I've seen various ways of embedding code within JPG files. Are there any methods in C# (or external libraries) which can confirm that a file is a JPG/PNG, otherwise throw an error? At the very least, I'm making the directory which holds uploaded images non-browsable and putting a max size limit of 1mb, but I'd like to implement further checks. Thanks for any advice.

    Read the article

< Previous Page | 54 55 56 57 58 59 60 61 62 63 64 65  | Next Page >