Sharing this since it was pretty useful to me…
I noticed recently that I had a huge amount of duplicate files in my MP3 library. I think what had happened was that, on an iTunes upgrade, I’d rebuilt my iTunes index with iTunes set to ‘Copy files to library’. The result was thousands of files with names like “01 I Can’t Explain 1.mp3”, where iTunes had copied “01 I Can’t Explain.mp3” into the same directory, but had to rename the file.
So… What to do… Well, after seeing that the duplicate files were bit-for-bit identical to the original, but for the ” 1″ at the end of the filename, I realized I could write a simple batch file (my home PC runs Windows XP), that would find the duplicates, compare them with the originals to check that they were actually identical, then delete them:
for /r "f:\my music\" %%I in (*.mp3) do (
if exist "%%~dpnI 1.mp3" (
echo Testing "%%~dpnI.mp3" against "%%~dpnI 1.mp3"
fc "%%~dpnI.mp3" "%%~dpnI 1.mp3" > nul
if not errorlevel 1 (
echo Match! Deleting "%%~dpnI 1.mp3"
del "%%~dpnI 1.mp3"
) else (
echo Found a non-match! "%%~dpnI.mp3" "%%~dpnI 1.mp3"
To be honest, it took me about an hour to figure out the right syntax for everything. I did try to neaten things up by assigning the
"%%~dpnI 1.mp3" thing to a variable
dupe, but gave up when I discovered that, in batch file land, variables are assigned when the line is read, not when it is executed (see this useful article for more explanation). To smarten up my batch file, not only did I have to use a strange
!dupe! syntax (‘delayed variable expansion’), but I had to run it with
cmd /v:on /c deldupes. In the end, I decided not to bother.
I hate batch files.
Hot on the heels of last week’s Jira plugin, Qingfeng Zhang (all I have is the name) has posted an an entry to the JA-SIG CAS wiki explaining how to integrate Sun Access Manager (aka OpenSSO) with JA-SIG CAS via an OpenSSO authentication module. This integration lets users login to CAS and access resources protected by OpenSSO. Nice work!
Again, I haven’t tried this out yet, but, if you have, let me know in the comments how you got on…
Over at Sun Developer Network today, Sidharth Mishra talks to Marina Sum about Security for Web Services. It’s an interesting, high-level discussion, covering both the motivations for securing Web services and some of the standards and technology in the area. In particular, there’s a useful explanation of the role of the Security Token Service (STS) in brokering trust between Web service consumers and providers.
Get yourself a nice cup of tea (or, if you must, coffee ) and give it a read.
They Said It Couldn’t Be Done
Behold – a picture of the IdentiCat – clear evidence of its existence! Close examination of this video, revealed today by IdentiCat witness Daniel Raskin, shows the creature frolicking on Sun Island in Second Life, rehearsing his forthcoming presentation on OpenSSO Enterprise 8. Click here to reserve your place in the audience, in Second Life, on September 30. Now, if you’ll excuse me, I have a gross of gentleman’s jackets to load onto my tractor…
Alexey Abashev, a Sun ISV engineer in Moscow, Russia, sent an email to the OpenSSO users mailing list a few weeks ago, announcing his Atlassian Jira extension for OpenSSO. The plugin page details how to deploy the extension and enable single sign-on to Jira via OpenSSO. Cool stuff!
I haven’t had a chance to try this yet, but, if you have, let me know in the comments how you got on…
I’ve blogged before on OpenSSO Extensions – useful modules that do not fit into the OpenSSO ‘core’. Among the various categories of extension are ‘authentication modules’ – one of the most common customizations for OpenSSO and Access Manager. An authentication module supports a particular mechanism for collecting and verifying a user’s credentials – common mechanisms that are supported out-of-the-box include username/password against LDAP, client certificates (encompassing browser certs and smartcards) and Windows Desktop SSO (aka SPNEGO, aka Kerberos).
Of course, technology refuses to stand still, and new authentication mechanisms are constantly being developed and deployed – new biometrics, hardware tokens, even whole new authentication protocols. Over the past few months, we’ve seen a clutch of new authentication modules in OpenSSO, so it’s time to take a look at what’s new…
- The Hitachi Finger Vein Biometric module (README), developed by Yasushi Iwakata, interfaces with a infra-red based reader to use the unique patterns of veins in each user’s finger as a credential. Yasushi recently left Sun, but continues as an external contributor to OpenSSO.
- Jeff Bounds blogged about his Verisign Identity Protection module back in June. Since that blog entry, Jeff has uploaded the source as an OpenSSO Extension, so it’s available to all; the README and Jeff’s blog entry have everything you need to get started.
- Strictly speaking, Wajih Ahmed‘s RSA Access Manager authentication module is located in the ‘core’ OpenSSO area, but it’s an authentication module just the same. It allows you to integrate OpenSSO (or, of course, Access Manager) with, uh, RSA Access Manager (formerly known as ClearTrust) for co-existence, either permanently or as an initial phase in a migration. Again, there’s a README to get you started.
So, three very different authentication modules. Maybe you have an idea for a fourth?
Prompted by James’ post, I just joined Kiva – a microfinance clearing house connecting individual lenders in developed countries (or indeed anywhere) with entrepreneurs from impoverished communities around the world. These are people who want to change their lives, but have little or no access to capital from traditional sources such as banks and credit cards. It’s a great concept – as it’s repaid, you can relend the money to other borrowers again and again and again.