w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
How to configure AD authentication and DB authurization in spring security 3.1
Have a look at the documentation: http://static.springsource.org/spring-security/site/docs/3.1.x/reference/ldap.html

Categories : Spring

Configure a custom object in Spring Security
The simplest way to do it using DaoAuthenticationProvider Ensure your User dao object extends org.springframework.security.core.userdetails.UserDetails Implement your org.springframework.security.core.userdetails.UserDetailsService and return your User dao object Configure DaoAuthenticationProvider with your UserDetailsService

Categories : Java

aws security groups - group to group
You can create just one security group with port 9999, enter the same security group name in the source and assign this security group to both instances that you want to communicate together. However, to make that happen, you need to use either Private IP i.e. 172.1.2.3 or Public DNS i.e. ec2-54-1-2-3.eu-west-1.compute.amazonaws.com. Port Range Source 9999 sg-abcdef The best is to use Public DNS because: When an EC2 instance queries the external DNS name of an Elastic IP, the EC2 DNS server returns the internal IP address of the instance to which the Elastic IP address is currently assigned.

Categories : Amazon

Configure backspace key properly in vi
Try adding the following to your .vimrc file, which would correct the behavior of the backspace key: set backspace=2 Also, you can execute it inside vi/vim command mode: :set backspace=2 Additionally, here is more information and solutions if this doesn't work for you: http://vim.wikia.com/wiki/Backspace_and_delete_problems

Categories : Linux

Configure spring security ldap-server attribute to use different url based on deployed environment
I've done that with Spring profiles: In your spring.*.xml config file use this at the end of your file: <beans profile="production"> ... </beans> <beans profile="local"> ... </beans> As VM Arguments the used profile must be provided: -Dspring.profiles.active=production Regards

Categories : Spring

How to configure to group grids in foundation 4
You should change the markup to group headers with their associated content. Instead of what you have, try something like this: <div class="large-6 small-12 columns"> <div> <span>Ship To</span> </div> <div> <span>Order Information</span> </div> </div> <div class="large-6 small-12 columns"> <div> <span>Content Of ShipTo</span> </div> <div> <span>Content Of Order Information</span> </div> </div> This will keep them stacked in small viewports and side-by-side in larger ones.

Categories : HTML

How to configure properly JNDI for tomcat 6 and its deployed webapps?
Each separate application within a single Tomcat application server is considered a separate instance of Derby. So two different applications in the same Tomcat app server cannot access the same copy of Derby, unless you use the Client-Server configuration of Derby and configure a Derby Network Server.

Categories : Spring

How to specify an EC2 Security Group using the eb cli
I hope this helps, create a .config on .ebextensions: Resources: AWSEBSecurityGroup: Type: "AWS::EC2::SecurityGroup" Properties: GroupDescription: "My Own SecurityGroup for ElasticBeanstalk environment." SecurityGroupIngress: - {CidrIp: "0.0.0.0/0", IpProtocol: "tcp", FromPort: "443", ToPort: "443"} - {CidrIp: "0.0.0.0/0", IpProtocol: "tcp", FromPort: "80", ToPort: "80"}

Categories : Amazon

How to properly load and configure Spring beans from an external utility jar
Two approaches by which you can solve this : (Please include the dependency as part of pom.xml) To manually include only the required utility beans into this new application-context.xml with the path referring to those class paths. That's the beauty of spring to create the selective bean only. Have a properties file (Include this in the new application-context.xml) <context:property-placeholder location="WEB-INF/utility.properties"/> <import resource="${application.path.of.utility.jar}"/> And define path ao the utility jar application.path.of.utility.jar=/utility/jar/path/application_context.xml

Categories : Java

In Eclipse, how to properly configure sources of Android Library Project?
From this answer: Right click on the non-library project (Project B) and select Build Path: In the Projects tab, add the library project Project A as a dependency. In the Order and Exports tab, be sure Project A is given higher precedence than the placeholder/bundle Library Projects. Thanks to this comment: In the call hierarchy view, click on the downward triangle in the top-right corner, select "Search In", and deselect "Application libraries".

Categories : Android

Properly enabling security for filepicker.io in Meteor
This is an example of how to do filepicker signed URLs in meteor, based on the documentation here: var crypto = Npm.require('crypto'); var FILEPICKER_KEY = 'Z3IYZSH2UJA7VN3QYFVSVCF7PI'; var BASE_URL = 'https://www.filepicker.io/api/file'; Meteor.methods({ signedUrl: function(handle) { var expiry = Math.floor(new Date().getTime() / 1000 + 60 * 60); var policy = new Buffer(JSON.stringify({ handle: handle, expiry: expiry })).toString('base64'); var signature = crypto .createHmac('sha256', FILEPICKER_KEY) .update(policy) .digest('hex'); return BASE_URL + "/" + handle + "?signature=" + signature + "&policy=" + policy; } }); Note this will need to exist somewhere inside of your server directory so you don't ship the key to th

Categories : Node Js

Getting two EC2 instances in the same security group to communicate
Open 9300 port for the security group where two instances are run (Even if same security group for both !!!) Use Group ID value. For instance sg-18e1f37a

Categories : Amazon

Spring security does not behave properly when session is reset
I restart my server which essentially clears out all the contents of the session. Since the session has been cleared out the user can no longer be considered to be logged in. According to your comment, that after server restart application behaves as if the user was logged in, I suspect that you have a session persistence enabled (it is enabled by default on Tomcat/JBoss), so you are actually logged in (the same JSESSIONID). Also, you probably loose your session content because objects that you put into session are not serializable. According to Tomcat documentation (JBoss behaves similarly in this case): Disable Session Persistence As documented above, every web application by default has standard manager implementation configured, and it performs session persistence acr

Categories : Spring

Check users in a security group in SQL Server
Accepted answer from DeanG is the preferred solution for getting this info within SQL Server You can use Active Directory tools for this. I like Active Directory Users and Computers that is part of the Remote Server Administration Tools. Follow the link to download and install the tools on Windows 7. Once installed, you can search for a specific group name: Then you can see group membership using the Members tab: If you don't want to use the AD browser packaged with RSA tools, there are several others available.

Categories : SQL

How to automatically add an autoscaled EC2 instance to a Security Group?
Create a security group called web. For the sake of an example, lets say the id of that group is: sg-7aa91911 Create a security group called db. Add a new rule to the db security group for port 1433 with the source of sg-7aa91911 Create an Autoscaling launch configuration and set the SecurityGroups to sg-7aa91911 and any other configuration you need. Create Autoscaling group with that launch configuration. I wrote up a quick CloudFormation template to do this task. You should be able to just run it and it will create an Autoscaling group with the connected security groups. It'll also create a blank instance where you can store your db. If you prefer not to use a CloudFormation template, just look at where the security groups are defined. It shows how the 2 security groups are to be c

Categories : Amazon

Sinatra EC2 Deployment Security Group Error
There are two possible causes for your problem. Your service is only listening to connections on the loopback interface. A software firewall is running and is blocking connections from outside on that port.

Categories : Ruby

'DOMAINDomain Users' group becomes 'SERVERNone' in Security Tab
it's clear. because you used a clone machine and joined it to the same domain as the source machine. so these machines had same SID。 you should sysprep the cloned machine before joining the domain;

Categories : Security

Security script based on Global Group?
Your Global Groups are probably just Active Directory Security groups. You can do this with not too much difficulty by using the builtin ASP.NET Role Provider, web.config entries to control which groups/roles can see which menu items, and binding your menu control to use a web.sitemap file. All of this combined with securityTrimmingEnabled. will ensure your menu options are shown to to users in the groups you have defined. If these are not AD groups, you can still do this but would have to create a Custom Role Provider which could check against your SQL Server groups or simply use the table you have already created. Your web.config location entries will end up looking something like this based on the example you provided, with entries for each of the pages you want to allow the user to s

Categories : C#

ASP.NET MVC / IIS / Elmah issue | Section or group name 'security' is already defined
OK it turns out this was related to setting MVCBuildViews to true... Which seemed like a reasonable think to want to do but seems to cause these issues. I'd be interested still to know a better solution that would allow me to continue to use this flag.

Categories : Asp Net Mvc

maximo - Enable/Disable section for security group
There are many ways to accomplish the same goal in Maximo. I know you can disable modules, tabs and or fields, but I am not sure about sections. This post discusses some of the different ways to restrict what is visible in Maximo by using the Conditional UI: http://maximodev.blogspot.com/p/conditional-expressions.html

Categories : Security

ansible ec2_group module failed to create new security group
I think you're missing a - in your playbook, ansible expects tasks to be a list. Try this: tasks: - local_action: instead of: tasks: local_action:

Categories : Amazon

listing inbounds for a security group of AWS EC2 inctances using Python boto
finally got solution for group in self.conn.get_all_security_groups(): for rule in group.rules: print dir(rule) for grant in rule.grants: print dir(grant) thanks to boto user mailing list

Categories : Python

Spring Security "" tag failed to evaluate url properly when there are multiple elements
Here is what worked for me: org.springframework.context.ApplicationContext ctx = org.springframework.web.context.support.WebApplicationContextUtils.getRequiredWebApplicationContext(getServletContext()); java.util.Map<String, org.springframework.security.web.access.WebInvocationPrivilegeEvaluator> wipes = ctx.getBeansOfType(org.springframework.security.web.access.WebInvocationPrivilegeEvaluator.class); if(wipes.size() > 0){ //I need last one org.springframework.security.web.access.WebInvocationPrivilegeEvaluator appEvaluator = (WebInvocationPrivilegeEvaluator)wipes.values().toArray()[wipes.size() - 1]; //set request attribute so that JSP tag can use it request.setAttribute(org.springframework.security.web.WebAttributes.WEB_INVOCATION_PRIVIL

Categories : Spring

d3.js - mouseover event not working properly on svg group
The g element is just an empty container which cannot capture click events (see documentation for pointer-events property for details). However, mouse events do bubble up to it. Hence, the effect you desire can be achieved by first making sure that the g receives all pointer events: .g_main { // .. pointer-events: all; } And then appending an invisible rectangle to it as a place to hover over: viz.on("mousemove", function () { cx = d3.mouse(this)[0]; cy = d3.mouse(this)[1]; redrawline(cx, cy); }) .on("mouseover", function () { d3.selectAll('.line_over').style("display", "block"); }) .on("mouseout", function () { d3.selectAll('.line_over').style("display", "none"); }) .append('rect') .attr('class', 'click-capture')

Categories : Javascript

How to set the port for HTTP(S) in EC2 Security Group Inbound settings for a secure public iPython Notebook server?
HTTP and HTTPs are both a TCP/IP protocol: http://www.w3schools.com/tcpip/tcpip_protocols.asp I also found this video which confirms this: http://youtu.be/JMedTCa5lec?t=4m29s and the red, crossed-out https in the url reflects the unverified certificate (probably because it's self-signed).

Categories : Http

JqueryMobile radiobutton horizontal group does not render properly
Try triggering the create method on the parent container and not directly on the inputs, for example $('#container').trigger('create'); jsfiddle

Categories : Jquery

Group by is not working properly in mysql select statement
To quote your question: So what I am doing in the select statement is get the messages where your id is in the to or from, then group it so that the row being used is the most recent message exchanged between you and the other person. This may be what you want to do. It is not what the query is doing. The group by clause is: GROUP BY IF(a.`from member_id`={$targetID}, a.`to member_id`, a.`from member_id`) When it encounters multiple rows that meet the condition, it chooses an arbitrary value for reach field from those rows. The order by has nothing to do with choosing the most recent message, even if that is what you want. To get the most recent message between two senders, try this: select least(`from member_id`, `to member_id`) as id1, greatest(`from member_id`,

Categories : PHP

MySql variable sequential calculation with group by do not work properly
Try this code, it worked for me :) SELECT col1, col2,col3, @a:=@a+(col2+col3) col4 FROM (select col1,sum(col2)col2,sum(col3)col3 from test group by col1) as tes JOIN (SELECT @a:= 0)t I made a fiddle for you : http://sqlfiddle.com/#!2/9b3ac/44 Hope it helps ;)

Categories : Mysql

How to properly auto-scale AWS EC2 Instances group in a relatively complex infrastructures?
Auto-scaling creates new nodes based on the launch configuration. So you would have two separate auto scaling groups and two separate launch configurations. ie "VarnishScalingGroup" : { "Type" : "AWS::AutoScaling::AutoScalingGroup", "Properties" : { "LaunchConfigurationName" : {"Ref" : "VarnishLaunchConfiguration" }, "LoadBalancerNames" : {"Ref" : "ELB"}, ... } }, "VarnishLaunchConfiguration" : { "Type" : "AWS::AutoScaling::LaunchConfiguration", "Properties" : { ... "UserData" : { .... }, "MetaData" : { ... } }, "ApacheScalingGroup" : { "Type" : "AWS::AutoScaling::AutoScalingGroup", "Properties" : { "LaunchConfigurationName" : {"Ref" : "ApacheLaunchConfiguration" }, "LoadBalancerNames" : {"Ref" : "InternalELB"}, ...

Categories : Amazon

How do I properly index a query that selects multiple fields when using GROUP BY and ORDER BY?
Here is an idea. Create an index on emails(created, batchid) and another on emails(batchid). Now do: select e.id, e.batch_id, e.user_id, e.subject, e.send_date, e.created from (select batchid, created from emails order by created desc limit 10 ) e10 join emails e on e.batchid = e10.batchid group by e.batchid order by created desc; The idea is to reduce the set you are processing, before doing the aggregation and ordering. It also sounds like your data would be better if it were more normalized. One table should have the batch information, including the sender and created date. The other should have

Categories : Mysql

TFS 2012 Configure Features Error - Unable to configure Planning Tools
Try this: Rename your User Story to "Product Backlog Item". Set the Initial State of you "Bug" to "Active". Try the Upgrade Rename your User Story Type back to "User Story". Remove the "Active" Initial State. Export your Common Process Config and add in your "Proposed" State into the Bug Configuration (see below). Import your Common Process Config. Example BugWorkItems <BugWorkItems category="Microsoft.BugCategory"> <States> <State type="Proposed" value="Proposed" /> <!-- more --> </States> </BugWorkItems>

Categories : Tfs

Any way configure to configure visual studio mvc build views release mode
Are you specifically setting something to compile the views like the Razor Generator? (http://razorgenerator.codeplex.com/) If not views in MVC are not compiled.

Categories : Asp Net Mvc

Spring Security 3.1.x & JSF 2.0 : " BeanCreationException: Error creating bean with name 'org.springframework.security.filterChains' "
I would start by checking your classpath (look in the lib directory of your WAR file) and make sure you don't have different Spring jars in there. It's not uncommon for maven to pull in transitive dependencies from some dependency and cause you to end up with Spring 3.0.x and Spring 3.1.x jars at once. You can avoid this by adding exclusions to your pom, or more simply by explicit versions each Spring jar you need. Then make sure you are using up-to-date versions of both Spring Security and Spring. Note that Spring and Spring Security are separate projects with independent version numbers. There's no reason why you can't be using Spring 3.2.3 with Spring Security 3.1.4, for example, but you should have the latest minor version of whichever release you choose.

Categories : Java

Cannot perform CAS Asserts in Security Transparent methods security level issue
I guess you are using a shared host, so there's no way you can changed trust level if they don't give you permissions to do it. What versions of the MySQL connector are you using? Have you tried copying them to the in folder of your project? (right-click on MySQL.* references and setting then to "Copy Local = true") Are you able to try to connect to your database server from localhost to make sure your connection string parameters are ok?

Categories : C#

What are the security ramifications of checking security with an HTTP call to an external server?
HTTPS makes sure the message can't be read or tampered with any relaying parties (proxies, etc.) but it doesn't guarantee the source of the data is trusted. If another service can determine the other URL and wire format they could spoof a request to it. This is generally where something like request signing comes into play using a shared-secret signing mechanism. Twilio's API uses this method to prove to you that they're actually calling your servers. HTTP Signatures is a proposal for a standardized way of doing this.

Categories : Api

java.lang.ClassNotFoundException: org.springframework.security.access.expression.SecurityExpressionHandler when using tag
When I checked my WEB-INF/lib folder I found that I had different versions of spring-security jars, some had 3.1.4 and others 3.0.2. It's working well now with all jars on 3.1.4 version ! Thank you Luke, your comment gave me the answer !

Categories : Spring

System.Security.SecurityException Request for the permission of type 'Microsoft.SharePoint.Security.SharePointPermission
I am also facing the same issue in my code. I have did the following and the issue has resolved. Please try the below and let me know whether it is solved the issue or not. File > Info > Design Checker > Open the Design Checker Window. In that, click Change Settings > Security and Trust > Choose the option Full Trust.

Categories : Sharepoint

Spring security override specific message : Your login attempt was not successful, try again. - not found under org.springframework.security
Actually it is easy resolvable by custom login form. Since it won't display any of sf error messages we can pass error param back after processing. Consequently simply check for this param and add whatever text message you like. authentication-failure-url="/login?error=true" then in our new login page simply add something like: <c:if test="${error}"> <s:message code="AbstractUserDetailsAuthenticationProvider.badCredentials"/></c:if> where you can use any message code from your resource bundle.

Categories : Spring

Providing security for Restful Web Services into existing Spring security 3.1
You should use two http tags. One for your web application and the other one for your REST API. Let's say, you can use an entry point web/** for your web app and an entry point api/** for your REST API. You propaply want to secure your API with HTTP Basic, so your web app should work with form login (that uses java session) and your REST API with HTTP Basic authentication. REST APIs are better secured with OAuth 2, but depending on size or audience of your application would be overkill.

Categories : Spring

ajax security versus php include in root directory security
There is nothing to stop someone from looking at your JavaScript code, getting the URL to the AJAX call. However, if security is a huge issue then look into session variables and the method of storing the value(s). There is file, database and cookie. You do not want php to store session variables in a cookie as these would be accessible to the visitor (they are stored like normal cookies). Set a session value, when the AJAX request is made then check if the session value is also set. If it is then continue as per normal. If it isn't (and the session could have timed out) then do nothing.

Categories : PHP



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.