SQL implementation of credential repository