Can www.example.com/node/123 be used as a canonical url?
Permanently redirecting the canonical URL is allowed, but discouraged by RFC 6596:


  To better ensure that applications properly handle the canonical link relation, administrators ought to consider the following guidelines:
  
  […]
  
  Avoid designating the target (canonical) as:
  
  […]
  
  The source IRI of a permanent redirect (for HTTP, this refers to 300 and 301 response codes defined in Sections 10.3.1 and 10.3.2 of [RFC2616]