Exposing Zeppelin Paragraph Link with anonymous Access - apache-zeppelin

I am trying to expose Apache Zeppelin Paragraph Link with anonymous Access. I am using Zeppelin 0.6.1 with LDAP authentication.
There is no straightforward way to do this, I tried exposing this URL in Shro.ini but it did not work.
I also tried making call to /ap/login in the background with credentials, but even then the link is not displaying anything.
What could be a possible solution in this scenario. I need to include the Zeppelin Paragraph Link on the home page.

Make sure that anonymous login is enabled for your zeppelin notebook, check if the following line is there in shiro.ini :
/** = anon
If yes, then check zeppelin-site.xml for the following line :
<property>
<name>zeppelin.anonymous.allowed</name>
<value>true</value>
<description>Anonymous user allowed by default</description>
</property>

Related

Sonata-Project's Google Authenticator: Undefined Method "getTwoStepVerificationCode" from Application\Sonata\UserBundle\Entity\User

guys!
I am currently working on a project built on Symfony 2.8 and a few Sonata-Project bundles. The goal is to achieve Two-Factor Authentication (a.k.a Two-Step Verification). I saw that Sonata-Project has a package for implementing such functionality and installed it. Then configured the app/config/config.yml file according to sonata's documentation, but when I try to log into my Dashboard from the login form, I do that without any further obstacles (no 2-Factor Authentication Prompt). Here, on stackoverflow.com, I've seen a few answers, (not-fully) related to my question, that suggest running php app/console sonata:user:two-step-verification *ADMIN_USER_NAME*. I've tried to run this command in my terminal, but got this exception thrown:
[Symfony\Component\Debug\Exception\UndefinedMethodException]
Attempted to call an undefined method named "getTwoStepVerificationCode" of class
"Application\Sonata\UserBundle\Entity\User".
What seems to be the problem here? Why such method doesn't exist? How can I resolve this issue?
P.S.: I try to use this Google-Authenticator package in conjunction with Soanata-Project's UserBundle as it is "a feature" (if I may call it such) of the latter.
Does your application properly extend Sonata\UserBundle\Entity\BaseUser? Because if not you will have this issue. Check your class Application\Sonata\UserBundle\Entity\User.

How to use Kerberos to secure Solr admin panel on standalone installation?

How can I use Kerberos to secure the Solr Admin panel on a standalone (non- Solr-Cloud) configuration? I've tried using https://cwiki.apache.org/confluence/display/solr/Kerberos+Authentication+Plugin but I don't understand how to set up authentication without Zookeeper/security.json.
As specified in the same wiki page you link to, you can specify you want to use the Kerberos Plugin as a Java System Property on node start up.
For example, in your solr.in.sh, you can add SOLR_AUTHENTICATION_OPTS="-DauthenticationPlugin=org.apache.solr.security.KerberosPlugin". You'll need a JAAS config file as well as some additional properties as well, you can see these specified in the "Define a JAAS Configuration File" and "Solr Startup Parameters" sections on the same page.
Note: The solr.kerberos.principal you specify must be the SPNEGO SPN (i.e. HTTP/solr.example.com#EXAMPLE.COM) for the full qualified domain name of the host the Solr node is located on.
This is likely different to the service principal you use for the internode communication that you register in your JAAS config file (something like solr/solr.example.com#EXAMPLE.COM).

Aurelia.js Single Page Application Keycloak Authentication Example

I need an example or pointers for using Keycloak.js authentication in an Aurelia.js-based single page web application. In my use case, a user should be able to access my web SPA before login. However, to gain access to additional resources, user will need to log in. No problem with with the backend apps. 'Just need web-client help.
I have basic HTML5 and Angular.js examples. It seems the example provided by bandrzejczak comes the closest.
'Have already searched throughout the web, read the Keycloak, Aurelia, Aurelia-Auth, Aurelia-Authorization docs. I have spent way too much time on this and am hoping someone has already solved this problem. -- Thanks
See Aurelia-Keycloak.
Aurelia-Keycloak
Alpha version. An authentication plugin based on KeyCloak for Aurelia applications.
Get Started
Install Aurelia-Keycloak:
jspm install aurelia-keycloak
Add keycloak configuration and initialization settings:
Follow Keycloak directions for creating a keycloak.json configuration file. Put this file in the same directory as your application's index.html file. Refer to the keycloak javascript adapter documentation for its initialization options and API.
Add plugin to your app's main.js. This example assumes your keycloak.json is in your root directory. This code will immediately cause the login screen to appear.
.plugin('aurelia-keycloak', {initOptions:{ onLoad: 'login-required' }})
To defer login, use the following:
.plugin('aurelia-keycloak')
Then, construct a login button within your code to call the keycloak login function.
Rather than use a keycloak.json file, you can insert the installation config with the plugin declaration
`.plugin('aurelia-keycloak',{install:{PASTE GENERATED KEYCLOAK.JSON HERE}},initOptions:{ onLoad: 'login-required' }}
See the GITHUB for details.

How to configure redirects Glassfish4 Maven Webapp

I am developing a WebApp using Glassfish 4. I have a REST backend, developed in JAVA using Jersey, and a AngularJS frontend. All this is contained in a MAVEN Jersey-Quickstart-Webapp.
Now, the problem I have is that when people query the URL for my app:
http://localhost:8080/MyApp/
It works fine, and sends the appropriate index.html to the user. However, if the user types a URL that 'should' be handled by my Apps routing, say like:
http://localhost:8080/MyApp/search
it gives a 404 error. However, this URL can be reached from within in the app if you start from the /MyApp/ route, because the index.html that is served with all the angularJS stuff is able to understand and control the routing.
Essentially the problem I face is that I need to set up the appropriate redirects for all the necessary places that should return the index.html.
So, when I hit any of the following URLs it should send the user the index.html, and let AngularJs figure out the routing
Eg.
http://localhost:8080/MyApp/search ----> index.html
http://localhost:8080/MyApp/results ----> index.html
http://localhost:8080/MyApp/browse ----> index.html
Unfortunately, I am probably being really thick here, but I don't know how to configure the server/webapp to do this. How do I go about doing this? I assume it is fairly obvious/trivial, but I'm pretty new to all this stuff, so go easy on me!
EDIT 1: I've had some good help about using a mod-rewrite or the UrlRewriteFilter but neither of these seems to work for Glassfish4 as far as I can see. Is there an equivalent out there for these that somebody might know of?
Log into glassfish In the Admin Console, expand the Configurations
node. Expand the server-config node. Ignore this step if you are
running a developer domain (a domain that does not have clustering
capability). Expand HTTP Service. Expand Virtual Servers. Click
server. On the Edit Virtual Server page, click the Add Property
button. In the Name column, type redirect_1.
If you are using Application Server 9.0, type
from=//myproduct1
url-prefix=/mywarname/mypages/products/myproduct1.jsp in the Value
column.
Note - The value of the you provide here needs to
match the value of the context root specified in the web.xml or
application.xml file.
As #Tunaki says, you need use an apache and use the mod_rewrite.
also, you can use UrlRewriteFilter thats allows you to rewrite URLs before they get to your code.
For that, you need add to your maven file the dependency:
<dependency>
<groupId>org.tuckey</groupId>
<artifactId>urlrewritefilter</artifactId>
<version>4.0.3</version>
</dependency>
And add in your WEB-INF/web.xml file:
<filter>
<filter-name>UrlRewriteFilter</filter-name>
<filter-class>org.tuckey.web.filters.urlrewrite.UrlRewriteFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>UrlRewriteFilter</filter-name>
<url-pattern>/*</url-pattern>
<dispatcher>REQUEST</dispatcher>
<dispatcher>FORWARD</dispatcher>
</filter-mapping>
Also, you have a big number of parameters specified in the documentation:
http://cdn.rawgit.com/paultuckey/urlrewritefilter/master/src/doc/manual/4.0/index.html#filterparams
http://localhost:8080/MyApp/search ----> search.html
http://localhost:8080/MyApp/results ----> results.html
http://localhost:8080/MyApp/browse ----> browse.html

dotnetnuke up and running error

I developed a DotNetNuke application and hosted it on a web server. When I browse the site, I am getting the following error:
Server Error in '/' Application.
Runtime Error Description: An
application error occurred on the
server. The current custom error
settings for this application prevent
the details of the application error
from being viewed remotely (for
security reasons). It could, however,
be viewed by browsers running on the
local server machine.
Details: To enable the details of this
specific error message to be viewable
on remote machines, please create a
<customErrors> tag within a
"web.config" configuration file
located in the root directory of the
current web application. This
<customErrors> tag should then have
its "mode" attribute set to "Off".
<!-- Web.Config Configuration File -->
<configuration>
<system.web>
<customErrors mode="Off"/>
</system.web> </configuration>
Notes: The current error page you are
seeing can be replaced by a custom
error page by modifying the
"defaultRedirect" attribute of the
application's <customErrors>
configuration tag to point to a custom
error page URL.
<!-- Web.Config Configuration File -->
<configuration>
<system.web>
<customErrors mode="RemoteOnly"
defaultRedirect="mycustompage.htm"/>
</system.web> </configuration>
Can any one tell me how to resolve the problem...
The main problem here is that you aren't getting any detail about what the error. Any success achieved while troubleshooting this without exposing some more detail (or knowledge of your setup) is going to be pretty close to pure luck.
I would suggest following the instructions that this default error message is giving you and editing the web. config file. The file is named "web.config" and it lives in the root of the website.
Open the file and search for "RemoteOnly", you should see something that says customErrors mode="RemoteOnly". Change the "RemoteOnly" to "Off" and save the file. The next time you browse to the site you should see a more detailed error message. Please share that with us here in the form of an update to your current post or as a new question (which I recommend, as it technically will be a different question).
Also, I recommend making a backup copy of the web.config file first before making any changes.
You need to check if your ASP.NET is functional. Since you didnt post any details on your web server, i would recommend you check if you have .NET 2.0 installed and your web server is configured to use it.
You can run aspnet_regiis -i in the c:\WINDOWS\Microsoft.NET\Framework\v2.x.x.x. directory to re-register the aspnet modules.
You might also want to check if your virtual directories have the execute permission enabled.
When you say you "developed a DotNetNuke application" I need more information.
Did you develop a DotNetNuke MODULE?
If so, did you install it on a DotNetNuke site that was working before, but isn't now?

Resources