sqlplus substr formating and column width


Doing a little connection pool troubleshooting (OAAM, I am looking at you!)  I found a great sqlplus script on stackoverflow.

The script uses the substr function to format the width of each column. As in:


select
       substr(a.spid,1,9) pid,
       substr(b.sid,1,5) sid,
       substr(b.serial#,1,5) ser#,
..

The problem: The column widths are all too wide. The values specified in the substr function seem to be ignored.

The solution:  If your database is using a multi-byte character encoding (and why wouldn't you?) you need to use the substrb function. Like this:

select
       substrb(a.spid,1,9) pid,
       substrb(b.sid,1,5) sid,
       substrb(b.serial#,1,5) ser#,
..

The Rise & Protection of the API Economy

Nearly every decent web site and application will have an application programming interface (API) of some sort.  This may simply be another interface into the applications most advanced administrative controls, controls which perhaps are used by only 5% of users and would clutter up even the most clearly designed user interfaces.  To make those controls open to end users, they have traditionally been exposed in a programmatic manner, that only deep technologists would look at or need to use.  In addition, those API's were probably only ever exposed to private internal networks, where their protection from a security perspective was probably less of a concern.




API's Today

As more organizations (and consumers of course) leverage applications and services online, there is an increasing percentage of web based API's.  A quick book search on Amazon produces over 200  results with regards to their design.  Undergraduate computer science courses will often have a module on basic web programming, with the simplest examples now choosing to build out an API instead of a full blown user interface driven application.  Many consumer focused applications and social networking sites such as Twitter, Google and Facebook, all lean heavily towards API level features.


Why They're Popular

For the likes of the consumer focused social networking platforms, API's provide a powerful tool to promote developer adoption.  Increased developer adoption for the likes of Facebook, increase the attractiveness of the service being offered, especially if more versions of Angry Birds or Candy Crush are being released.  API's in this framework, are all about certain features and ease of use. The premise is focused on being able to expand and extend the underlying platform as quickly and simply as possible, using a variety of client libraries and languages.

From a more business focused web application, API's are more focused on integration, interoperability and customization.  Integration with regards to owned business logic and process, interoperability with regards to underlying system and language differences and customization, perhaps relating to user experience.

Many web services in general could be argued to be solely API driven.  Sites like the Google owned VirusTotal, which provides a virus checking aggregation service, can be accessed using a user interface or API.  The same could be applied to Google itself

Why They Need Protecting

As web services and applications switch to becoming more engine like in nature, with limited or no user interface at all, the protection of the underlying API becomes more important.  The increased popularity of REST as architecture for web API development, provides not only an increased ease of use for developers, but also simpler touch points for the authentication and authorization of endpoint clients.  Knowing which clients are accessing your API is critical, as is being able to restrict their access to certain features or URL's.

Like with many security related aspects, externalising the authentication and authorization aspect away from core API feature management, allows developers to focus on core use cases and consumer and business value, without worrying about security.


By Simon Moffatt

Identity & Access Management: Give Me a REST

Give me a REST (or two weeks stay in a villa in Portugal if you're asking...).  RESTful architectures have been the general buzz of websites for the last few years.  The simplicity, scalability and statelessness of this approach to client-server communications has been adopted by many of the top social sites such as Twitter and Facebook.  Why?  Well, in their specific cases, developer adoption is a huge priority.  Getting as many Twitter clients or Facebook apps released, increases the overall attractiveness of those services and in a world where website and service competition is as high as ever, that is a key position to sustain.


Why REST?

Cute picture of RESTing lion [1]
The evolution and move to REST is quite a clear one from a benefits and adoption perspective.  REST re-uses many of the standard HTTP protocol verbs such as GET, POST and DELETE,  when constructing URL's.  These verbs are well understood and well used, so there's no new syntactic sugar to swallow.  Each component of the service owners database is abstracted into neatly described resources that can be accessed using the appropriate URI.  Requests can then be made to return, say, a JSON or XML representation of the underlying database object.



The client, permission granted, can then in turn update or create a new object in the same way, by sending a new JSON object via a PUT or POST request.

What's This Got To Do With IAM?

Identity management has often been thought of as an enterprise or organizational problem, focussing on the the creation and management of company email, mainframe and ERP system accounts.  This process then brought all the complexity of business workflow definition, compliance, audit, system integration and so on.  Access management on the other hand, has often been focused on single-sign-on, basic authorization and web protection.  IAM today is a much more complex and far reaching beast.  

Organizations are reaching out into the cloud for services, API's and applications.  Service providers and applications are becoming identity providers in their own right, reaching back out to consumers and businesses alike.  For once, identity management is on the tip of the tongue of the most tech-avoiding consumers, concerned with privacy, their online-identities and how they can be managed and consumed.

A RESTful Future

These new approaches to identity and access management require rapid integration, developer adoption and engine-like API's that can perform in an agile, scalable and secure fashion.  Identity and access management services for consumers, such as being able to login with their Facebook or Twitter account using OAuth or OAuth2 without having to create and manage multiple passwords for the other sites they interact with, not only increases user convenience.  It also puts pressure on business security strategies as they can struggle to cope with the ability for employees to bring-their-own-identity to many of the now popular business services such as Webex, Dropbox, Salesforce and the like.

As identity management is no longer solely concerned with siloed, business unit or organisational boundaries and looking more to being fully connected, integrated and focused on consumerization, developer adoption has never been more important.  Security in general, has never been a high priority for application builders, who are more centred on features and end usability.

Identity and access management is making a big change to that area with many access management systems being easy to externalize from application logic using RESTful integration.


By Simon Moffatt

[1] - Image attribute Stock.Xchng http://www.sxc.hu/profile.big_foot

Thanks to all participants of the 1st ForgeRock Open Identity Summit !

ForgeRock Open Identity Summit opening

I hope all attendees enjoyed the summit as much as I have. It’s been a real pleasure to meet face to face some of the project members, customers and partners I’ve interacted with, over emails and phone for the last 3 years, and to see again colleagues, ex-coworkers…

All the photos that I’ve captured during the summit are now publicly available on Flickr.

See you at the next summit !

[Update on June 19] The presentations from the summit are now online. Goto the Summit page and click on the Agenda.

LP0_8918LP0_8901LP0_8817


Filed under: General Tagged: conference, ForgeRock, identity, ois13, openam, opendj, openidm, photography, photos