Symfony2: Unrecognized options "method_access_control" under "jms_security_extra" error - security

So I'm trying to configure security access for some of my methods here, through JMSSecurityExtraBundle. I simply followed the instructions here : JMSSecurityBundle Doc.
I ended up having this in my config.yml file:
jms_security_extra:
secure_controllers: true
secure_all_services: false
method_access_control:
'MyBundle:.*:postEntityDelete': 'hasRole("ROLE_SUPER_ADMIN")'
Now I'm simply getting that error:
InvalidConfigurationException: Unrecognized options "method_access_control" under "jms_security_extra"
How can I have gone wrong on so little? Where's the catch and how do I solve this problem?
Thanks in advance!
Edit:
Deps :
[JMSSecurityExtraBundle]
git=https://github.com/schmittjoh/JMSSecurityExtraBundle.git
target=/bundles/JMS/SecurityExtraBundle
[metadata]
git=https://github.com/schmittjoh/metadata.git
version=1.1.0 ; <- make sure to get 1.1, not 1.0
[JMSAopBundle]
git=https://github.com/schmittjoh/JMSAopBundle.git
target=/bundles/JMS/AopBundle
[cg-library]
git=https://github.com/schmittjoh/cg-library.git
[JMSDiExtraBundle]
git=https://github.com/schmittjoh/JMSDiExtraBundle.git
target=/bundles/JMS/DiExtraBundle
Deps.lock:
symfony v2.0.13
twig v1.7.0
monolog 1.0.2
doctrine-common 2.1.4
doctrine-dbal 2.1.6
doctrine 2.1.6
swiftmailer v4.1.7
assetic v1.0.3
twig-extensions 446d870272cd87a720e95242eade38a2acf56eaa
metadata 1.0.0
SensioFrameworkExtraBundle cb61b92ed55241d93ed9726bc3f5f47c7d2ce8fe
JMSSecurityExtraBundle e752f888c51425f71382c056961f10f2be642102
SensioDistributionBundle 20b66a408084ad8752f98e50f10533f5245310bf
SensioGeneratorBundle b1ccb78c1743f30817b0fce9bb5c6baff6ed7bf8
AsseticBundle v1.0.1

What version of symfony and of the bundle are you using? The documentation you linked is following the master branch. There are links in the upper left to change versions. 1.0 doesn't seem to have that configuration option.
the deps file should contain:
[JMSSecurityExtraBundle]
git=http://github.com/schmittjoh/JMSSecurityExtraBundle.git
target=/bundles/JMS/SecurityExtraBundle
version=origin/master
You can also see here for someone else that had the same issue https://github.com/schmittjoh/JMSSecurityExtraBundle/issues/24

Related

Could not find org.nodejs:node

I am trying to build my gui application (angular implementation) and I am getting the following error:
Caused by: org.gradle.internal.resolve.ModuleVersionNotFoundException: Could not find
org.nodejs:node:10.14.1.
Searched in the following locations:
- https://nodejs.org/dist/v10.14.1/ivy.xml
build.gradle contains (relevant to nodejs):
node {
version = '10.14.1'
npmVersion = '6.4.1'
download = false
}
dependencies {
classpath("com.moowork.gradle:gradle-node-plugin:1.2.0")
}
}
apply plugin: 'java'
apply plugin: 'com.moowork.node'
gradle.properties contains:
systemProp.https.proxyUser=''
systemProp.https.proxyPassword=''
systemProp.http.proxyUser=''
systemProp.http.proxyPassword=''
systemProp.https.proxyHost=internet.proxy.company.com
systemProp.https.proxyPort=port
systemProp.http.proxyHost=internet.proxy.company.com
systemProp.http.proxyPort=port
npm config contains:
https-proxy=http://internet.proxy.company.com:port/
proxy=http://internet.proxy.company.com:port/
registry=http://registry.npmjs.org/
sslVerify=false
strict-ssl=false
Even if I remove the node js dependency (for giggles), it still throws this error. Any help is greatly appreciated. At first, I thought it was a proxy issue but I do not think that is the case. Any ideas?
com.moowork.node is not actively maintained and has this issue. Switch to the fork of this plugin which is actively maintained and has fixed this issue.
https://github.com/node-gradle/gradle-node-plugin/
For more details as to why it is failing, see this comment.

How do I get a specific version of Cassandra in Embedded-Cassandra

In Embedded-Cassandra (https://github.com/nosan/embedded-cassandra/wiki), the default version seem to be 3.11.4. I want to use 3.11.3. I tried setting the version but got error
val factory = new LocalCassandraFactory
println(s"factory is ${factory}")
factory.setVersion(("3.11.1"))
...
Error
WARN c.g.n.e.c.l.a.RemoteArtifact - HTTP (404 Not Found) status for URL 'http://www.mirrorservice.org/sites/ftp.apache.org/cassandra/3.11.3/apache-cassandra-3.11.3-bin.tar.gz'
Indeed, the version doesn't exist at
http://www.mirrorservice.org/sites/ftp.apache.org/cassandra/
How can I use a specific version of Cassandra in EmbeddedCassandra
Did you get an exception or only a warning message ?
RemoteArtifact tries to download an archive from several URLs.
https://apache.org/dyn/closer.cgi?action=download&filename=cassandra/${version}/apache-cassandra-${version}-bin.tar.gz
https://archive.apache.org/dist/cassandra/${version}/apache-cassandra-${version}-bin.tar.gz
The second link works fine for me.
https://archive.apache.org/dist/cassandra/3.11.3/apache-cassandra-3.11.3-bin.tar.gz

invalid SSL_version specified at /usr/local/share/perl5/IO/Socket/SSL.pm line 598

When I try send an email using Net::SMTP::TLS from perl script I am getting below:
invalid SSL_version specified at /usr/local/share/perl5/IO/Socket/SSL.pm line 598
OS:Linux
You know what the problem is and what I have to do to fix it?
Thank you!
Net::SMTP::TLS is not maintained since 10 years and it is broken in that it causes exactly the error you describe. If you insist of using this broken module you need to fix it. Change the code in line 182 to remove the invalid setting of SSL_version:
if(not IO::Socket::SSL::socket_to_SSL($me->{sock},
- SSL_version => "SSLv3 TLSv1")){
+ )){
croak "Couldn't start TLS: ".IO::Socket::SSL::errstr."\n";
}
Instead of using the broken and unmaintained Net::SMTP::TLS or its successor but again unmaintained Net::SMTP::TLS::ButMaintained I suggest you use the latest version of Net::SMTP which has built in support for both kinds of SMTP+SSL and for IPv6 too. It comes already by default with newer Perl versions.
If using a new Net::SMTP is not possible you might use Net::SSLGlue::SMTP which monkey patches older Net::SMTP version to add SSL support. And there is also Net::SMTPS which provides a similar functionality.
Let me summarize as I had just fixed my problem (Thanks to the contributors above)
Open [Perl_dir]/site/lib/Net/SMTP/TLS.pm
Look for line 182, which looks like
if(not IO::Socket::SSL::socket_to_SSL($me->{sock}, SSL_version=>"SSLv3 TLSv1")){
Changed to line below by removing "SSL_version=>"SSLv3 TLSv1"
if(not IO::Socket::SSL::socket_to_SSL($me->{sock})){
Save [Perl_dir]/site/lib/Net/SMTP/TLS.pm
Other ref URL:
http://www.pclinuxos.com/forum/index.php/topic,143156.msg1223280.html#msg1223280

Seaside - How do I install Scriptaculous on a clean Seaside install (via Configuration Browser) on Pharo?

I used the method described here to install Seaside3 on Pharo. All is well, but Scriptaculous doesn't come preinstalled. How do I get it?
Seaside3 :
1: Go to the configuration manager
2: Select the Seaside 3 configuration. Click on Install.
3: Wait while it loads. Takes a couple of minutes on an i7 and a decent network link.
4: Open a Workspace and start a ZincServerAdaptor on the port you like (here 8080):
ZnZincServerAdaptor startOn: 8080. (then CMD+d for Do It)
7: Access Seaside from your browser.
8: Install Scriptaculous, but how?
Johan B's input:
http://forum.world.st/Seaside-How-do-I-install-Scriptaculous-on-a-clean-Seaside-install-via-Configuration-Browser-on-Pharo-td4802930.html
Pharo’s Configuration browser loads the default group of the Metacello configuration, which unfortunately was set to ‘Core’ for Seaside 3.1.
So, you will need to load additional groups programmatically:
(ConfigurationOfSeaside3 project version: #stable) load: #('Scriptaculous' 'JSON')
If you want to get the list of possible groups to load, inspect:
(ConfigurationOfSeaside3 project version: #stable) groups
Install from scratch with:
(ConfigurationOfSeaside3 project version: #stable) load: #('default' 'Scriptaculous' 'JSON')
This is something we fixed for Seaside 3.2, where the default will load everything to help newcomers.
We prefer not to change the existing 3.1 configuration versions to not break existing uses, but it’s fixed in the upcoming version.
Btw, Scriptaculous is really outdated. You will prefer to use jQuery and jQuery-UI (or any other JS framework…)
My findings on the subject:
Well, finally figured it out.
The packages needed for Scriptaculous to work are listed in the book here:
http://book.seaside.st/book/web-20/scriptaculous/frameworks/installation
Then you need to find a repository to get them from, after a little poking around here:
http://www.smalltalkhub.com/mc/Seaside/
I chose the Seaside31 repository, which is what I apparently managed to install a few hours ago.
http://www.smalltalkhub.com/mc/Seaside/Seaside31/main
Then I had to Do-It a couple of times on (maybe there is a faster way to do this):
Gofer new
url:'http://www.smalltalkhub.com/mc/Seaside/Seaside31/main';
package: 'Javascript-Core';
load.
Gofer new
url:'http://www.smalltalkhub.com/mc/Seaside/Seaside31/main';
package: 'Prototype-Core';
load.
Gofer new
url:'http://www.smalltalkhub.com/mc/Seaside/Seaside31/main';
package: 'Scriptaculous-Core';
load.
Gofer new
url:'http://www.smalltalkhub.com/mc/Seaside/Seaside31/main';
package: 'Scriptaculous-Components';
load.
For those looking to install jQuery into Seaside can use these:
Gofer new
url:'http://www.smalltalkhub.com/mc/Seaside/Seaside31/main';
package: 'Javascript-Core';
load.
Gofer new
url:'http://www.smalltalkhub.com/mc/Seaside/Seaside31/main';
package: 'JQuery-Core';
load.
Gofer new
url:'http://www.smalltalkhub.com/mc/Seaside/Seaside31/main';
package: 'JQuery-UI'; "notice that there is no -Core on this one, I don't know why"
load.
If one wants to load a full fledged configuration in Pharo 4.0 (after having loaded Seaside from the configuration browser):
| config groups |
config := (ConfigurationOfSeaside3 project version: #release3).
"Inspect this in case you want to see what's available"
groups := config groups.
"Load the usual suspects"
config load: #('OneClick' 'Javascript' 'Javascript Tests' 'JQuery' 'JQuery Tests' 'JQueryUI' 'JQueryUI Tests' 'JQueryUI Examples' 'REST' 'REST Tests' 'JSON' 'JSON Tests').
An additional interesting configuration to load is Bootstrap.
Check the configuration browser.

Configuration does not have any version information - assuming the configuration is for version 1.5

Where in ccnet.config set version? I search and read docs but there is no version mentioned.
You can add this line in your config file:
<cruisecontrol xmlns:cb="urn:ccnet.config.builder" xmlns="http://thoughtworks.org/ccnet/1/5">
It is mentionned in this tracker CCNET-1870 :
http://jira.public.thoughtworks.org/browse/CCNET-1870
#Andy I got the same error in one of my configurations.
If you use cb:include in your configuration file, you should also give xmlns=version-url cb:config-template in configuration files included by cb:include.

Resources