code: func (ctx *Context) GetIdentifier(fields []string) (interface{}, error) {
  	switch fields[0] {
  	case UserIdentifier:
  		var user User
  		if ctx.User == nil {
  			user = emptyUser
  		} else {
  			user = ctx.User
  		}
  		return predicate.GetFieldByTag(user, teleport.JSON, fields[1:])
  	case ResourceIdentifier:
  		var resource Resource
  		if ctx.Resource == nil {
  			resource = emptyResource
  		} else {
  			resource = ctx.Resource
  		}
  		return predicate.GetFieldByTag(resource, "json", fields[1:])
  	default:
  		return nil, trace.NotFound("%v is not defined", strings.Join(fields, "."))
  	}
  }
docs: // GetIdentifier returns identifier defined in a context