def get_loggable_url(url):
    """Strip out secrets from taskcluster urls.

    Args:
        url (str): the url to strip

    Returns:
        str: the loggable url

    """
    loggable_url = url or ''
    for secret_string in ('bewit=', 'AWSAccessKeyId=', 'access_token='):
        parts = loggable_url.split(secret_string)
        loggable_url = parts[0]
    if loggable_url != url:
        loggable_url = '{}<snip>'.format(loggable_url)
    return loggable_url
