Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Data Visualization Desktop: Make it Yours, But do not Forget Security!

Gianni Ceresa
December 04, 2017

Data Visualization Desktop: Make it Yours, But do not Forget Security!

Custom plugin development for Oracle Data Visualization Desktop and the security impact of using unknown and from not trusted sources.

Presented at UKOUG Tech17 in Birmingham (UK)

Gianni Ceresa

December 04, 2017
Tweet

More Decks by Gianni Ceresa

Other Decks in Technology

Transcript




  1. How to build a custom plugin (the theory)
    How to build it without doc as there isn’t one
    (I hope you like JavaScript…)
    DVD is more similar to OBIEE than what you can imagine
    Web service APIs
    At least a bit about the current version of it:
    v4 (aka 12.2.4.0.0)

    View full-size slide











  2. View full-size slide



  3. What you get from Oracle

    View full-size slide

  4. set DVDESKTOP_SDK_HOME="C:\Oracle\Oracle Data Visualization Desktop"
    set PLUGIN_DEV_DIR="C:\Oracle\DVD_plugins"
    set PATH=%DVDESKTOP_SDK_HOME%\tools\bin;%PATH%
    cd %PLUGIN_DEV_DIR%
    bicreateenv
    bicreateplugin viz -id ch.datalysis.tech17demo -subType dataviz
    Path where DVD is installed
    Path where the plugins
    will be developed
    (optional)
    Unique ID, java package “style” name

    View full-size slide

  5. .\gradlew run
    Definitely SDK mode
    Interesting URL:
    127.0.0.1 a webserver run locally
    port 49765, can be different
    as it’s a randomly chosen port
    /va/ui/home.jsp just like in OBIEE

    View full-size slide

  6. document.cookie="ORA_BI_SESSTOK=authenticated; path=/"

    View full-size slide

  7. WARNING
    Code is about to start,
    I hope you like JavaScript

    View full-size slide



  8. skin!css!ch-datalysis-tech17demo/tech17demostyles
    ch-datalysis-tech17demo/Donut3D

    View full-size slide

  9. render
    Where the fun happen

    View full-size slide

  10. render
    d3.select("body")
    d3.select(elContainer)
    $(elContainer).empty();
    Sample code use the same standard,
    variables names start by the type:
    “el” = element, “n” = number etc.

    View full-size slide

  11. Paste the code for
    the 3D Donut directly
    inside “render” after
    the existing code
    Main change to use the provided container

    View full-size slide

  12. Random column just
    to be able to have a
    canvas
    My custom plugin
    Match perfectly the sample

    View full-size slide

  13. Easy, isn’t it?
    The plugin display a 3D donut, sure, but…
    • It doesn’t resize
    • It doesn’t display any real value coming from DVD
    • It doesn’t react to anything
    Keeping it short: we have a nice but useless plugin !
    And now it’s where the painful part starts …

    View full-size slide



  14. var nWidth = $(elContainer).width();
    var nHeight = $(elContainer).height();
    nWidth nHeight
    • resizeVisualization
    • _render
    • _render resizeVisualization
    • render _render

    View full-size slide

  15. Triggered on resize
    Empty function calling
    the new _render
    New “render” function No formal doc, found the code in a tutorial…

    View full-size slide

  16. Figures are still random,
    they change at each call of
    _render

    View full-size slide





  17. If there was a clear formal doc I could tell you exactly what it is and how it works …
    As there isn’t one, I can just “guess” based on samples and pieces of code

    View full-size slide

  18. getEdgeExtent
    getItemEndSlice



    getValue
    getNumberValue
    Column 1 Column 2 Column 3 # row
    A A1 10 0
    A2 25 1
    A3 5 2
    B B1 2 3
    B2 6 4
    B3 8 5
    C C1 15 6
    layers

    View full-size slide

  19. var color = d3.scale.category20();
    color(i)
    i color(i)
    If there was a doc I could probably ask DVD to gives me colours
    for the values to keep them in sync with other canvas, but there
    isn’t one …

    View full-size slide

  20. Let’s stop here with a custom plugin development…
    A lot more should/could be done (colours, legend, interactions etc.)
    • The lack of documentation is clearly not helping
    • Lot of functions exists
    (look for a file named “report_base.js” and enjoy finding nice interesting
    things inside)
    • It is extremely time consuming

    View full-size slide









  21. View full-size slide





  22. View full-size slide






  23. (remember I said DVD is more similar to OBIEE than what you could imagine?)

    View full-size slide






  24. View full-size slide








  25. View full-size slide







  26. View full-size slide







  27. View full-size slide


  28. I’m not telling you it’s the case
    I’m not telling you to find a way to do it that way
    I’m just expressing a “theoretical” possibility…

    View full-size slide