Your understanding is correct. Just configure white list to allow the specific URLS you want to allow and configure default block to block everything else.
root@srx> show configuration security utm
custom-objects {
url-pattern {
url1 {
value www.google.com;
}
}
custom-url-category {
Google {
value [ url1];
}
}
}
feature-profile {
web-filtering {
url-whitelist Google;
type juniper-local;
juniper-local {
profile Test {
default block;
}
}
}
}
root@srx >
https://www.juniper.net/documentation/en_US/junos/topics/example/utm-web-filtering-local-custom-object-configuring-cli.html
root@srx> show configuration security utm
custom-objects {
url-pattern {
url1 {
value www.google.com;
}
}
custom-url-category {
Google {
value [ url1];
}
}
}
feature-profile {
web-filtering {
url-whitelist Google;
type juniper-local;
juniper-local {
profile Test {
default block;
}
}
}
}
root@srx >
https://www.juniper.net/documentation/en_US/junos/topics/example/utm-web-filtering-local-custom-object-configuring-cli.html